We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi @Quramy . I love this library. This is very useful.
I am using it with graphql-codegen.
define fragment
export const KCG_CARD_FRAGMENT = gql` fragment KCGCardKnowledgeCategoryGroup on KnowledgeCategoryGroup @argumentDefinitions( level: { type: "EngineerLevel", defaultValue: NEWBIE } occupation: { type: "EngineerOccupation", defaultValue: BACKEND } ) { id name programmingResource { id name thumbnailUrl } knowledgeCategories(level: $level, occupation: $occupation) { edges { node {
and using the fragment like this
export const CREATE_KCG_MUTATION = gql` mutation CreateKnowledgeCategoryGroup($name: String!, $programmingResourceId: ID) { createKnowledgeCategoryGroup( input: { name: $name, programmingResourceId: $programmingResourceId } ) { knowledgeCategoryGroup { ...KCGCardKnowledgeCategoryGroup } } } ${KCG_CARD_FRAGMENT} `;
Where, those arguments level and occupation are optional. But graphql-codegen says
level
occupation
AggregateError: GraphQLDocumentError: Variable "$level" is not defined by operation "CreateKnowledgeCategoryGroup".
Does it bug?? If it is my fault, please teach me correct definition.
node is v14.15.4
v14.15.4
"graphql": "14.7.0", "@graphql-codegen/add": "2.0.1", "@graphql-codegen/cli": "1.16.3", "@graphql-codegen/typescript": "1.16.3", "@graphql-codegen/typescript-operations": "1.16.3", "@graphql-codegen/typescript-react-apollo": "1.16.3", "@graphql-codegen/fragment-matcher": "1.17.8", "apollo-link-fragment-argument": "1.0.1",
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi @Quramy .
I love this library. This is very useful.
I am using it with graphql-codegen.
define fragment
and using the fragment like this
Where, those arguments
level
andoccupation
are optional.But graphql-codegen says
Does it bug??
If it is my fault, please teach me correct definition.
version info
node is
v14.15.4
The text was updated successfully, but these errors were encountered: