Closed kitten closed 2 months ago
Latest commit: f7962669bb4d2a7e2ffabcec3bb40e2d2a3919da
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Summary
This aims to reduce the amount of separate
templates.has
based checks and introduce a new check that can also detectgql.tada
via theTypeChecker
as a fallback if the name (or expression) ofgraphql()
calls is non-standard.Set of changes
checks.ts
for all predicatesgraphql()
calls by checking!!graphql.scalar
and!!graphql.persisted
via the typ e checkergraphql
itself is not an identifier (any expression)graphql
is renamed (more relevant now due to multi-schema support)graphql.persisted()
calls with the above logictemplates.has
into few reusable functionisCallExpression
was truthyNoSubstitutionTemplateLiteral
toStringLiteralLike
graphql('...')
andgraphql("...")
will work nowTypeChecker
based approach here forarguments[0]
orarguments[1]
yet, but this could lead to some refactors which might slim down the codebasegetAllFragments
from expanding to check for fragments via declarations (graphql-code-generator
code branch) even ifgql.tada
is active with newisTadaGraphQLCall
checkgraphql()
fragments array literal argumentas const
PropertyAccessExpression
s