Not generator custom directives at using 'schema-ast' #8640
-
After declaring the custom directive, I ran codegen. directive @rest(url: String) on FIELD_DEFINITION
scalar Date
scalar DateTime
scalar Currency
interface Node {
id: ID!
}
type PageInfo {
hasNextPage: Boolean! @deprecated(reason: "Use `hasNextPage` instead.")
hasPreviousPage: Boolean! @rest(url: "a")
startCursor: String!
endCursor: String!
uploadDate: Date
} After schema-ast runs, the rest directive I declared is gone. directive @rest(url: String) on FIELD_DEFINITION
scalar Currency
scalar Date
scalar DateTime
interface Node {
id: ID!
}
type PageInfo {
endCursor: String!
hasNextPage: Boolean! @deprecated(reason: "Use `hasNextPage` instead.")
hasPreviousPage: Boolean!
startCursor: String!
uploadDate: Date
} I want rest directive added. import { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
overwrite: true,
schema: ['src/relay/schema/schema.graphql'],
generates: {
'src/relay/__codegen__/schema.graphql': {
plugins: ['schema-ast'],
},
},
};
export default config; |
Beta Was this translation helpful? Give feedback.
Answered by
charlypoly
Nov 24, 2022
Replies: 1 comment
-
Hi @jungpaeng,
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
charlypoly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @jungpaeng,
schema-ast
cannot print your Schema directives due to GraphQL introspection limitations: graphql/graphql-spec#300