Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

113
Views
how to ignore @rest directives from apollo codegen

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",
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!