apollographql / apollographql/apollo-tooling

apollo client:check doen't find GraphQl Queries in gql('..') from graphql-codegen

Open
#2,678 3 comments 6 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

Hi there,

i just migrated from apollo codegen to graphql-codegen with the following config ` presetConfig: { gqlTagName: 'gql', },` as in your documentation, which is pretty awesome and works fine.
But we are also checking our queries against a schema with `apollo client:check`. But I couldn't configure the cli to find the gql(`...`) method generated by graphql-codegen. I could only find the --tagName option, which is not working.
Is it possible to tell apollo client:check to look for this specific gql function?

Cheers
Thomas

Contributor guide

Open the contributing guide

Research direction

Start with the Apollo client:check command and its --tagName option, then reproduce the reported graphql-codegen gql(...) configuration. Trace how the CLI discovers queries and determine whether the requested gql function can be recognized; done means client:check validates those queries against the schema.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.