New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directive "@deprecated" for arguments in SDL is ignored #317
Comments
I've spent several hours trying to figure out this problem without lack. Even more, there is another problem with directives for args. When I remove 1120-1124 lines then @vladar may I ask you to open a new PR with your fix? Please ignore the 254 test suite I'll fix it myself and add the following test suite: /* @flow */
import { printType } from 'graphql';
import { schemaComposer, dedent } from '../..';
describe('github issue #317: Directive @deprecated for arguments in SDL is ignored ', () => {
it('should build schema successfully', async () => {
const typeComposer = (schemaComposer.typeMapper.convertSDLTypeDefinition(`
type Foo {
foo(
arg: String @deprecated(reason: "Tired")
): String
}
`): any);
const type = typeComposer.getType();
expect(printType(type)).toEqual(dedent`
type Foo {
foo(
arg: String @deprecated(reason: "Tired")
): String
}
`);
});
}); |
I switched to something else at the moment. But will try to come up with a PR next week. |
🎉 This issue has been resolved in version 9.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Looks like the
@deprecated
directive for arguments in SDL is ignored. Check out the example:Now if I try building this type it renders without the
@deprecated
directive:I wanted to fix it and open a PR but looks like this is intentional:
graphql-compose/src/TypeMapper.js
Lines 1120 to 1124 in bd3bc96
So not sure what is the best course of action here. Any thoughts?
The text was updated successfully, but these errors were encountered: