how to ignore @rest directives from apollo codegen

Viewed 115

I'm using @rest directive to request some data from REST API, but when I use the command apollo client:codegen this thrown an error like so:

 Cannot query field "acceptanceToken" on type "Query"

This error points to this @rest query.

Query that thrown the error

export const wompiAcceptanceTokenQuery = gql`
  query WompiAcceptanceToken {
    acceptanceToken
      @rest(
        type: "WompiAcceptanceToken"
        path: "some/api/endpoint"
      ) {
      data
    }
  }
`

There is a way to ignore this directives from npm client:codegen script?

Current NPM script

"typegenerate": "apollo client:codegen --target=typescript types --globalTypesFile=src/types/globalTypes.ts && rm -rf types",
0 Answers
Related