Skip to content

How can we use TypeScript with Apollo Client graphql codegen with Pothos? #691

Answered by hayes
wakywayne asked this question in Q&A
Discussion options

You must be logged in to vote

can you provide a little more detail on what is actually failing?

In general there are 3 options for using pothos with graphql-codegen:

  1. Load the schema from the running service
    • This looks like what you are trying to do with schema: 'http://localhost:3000/api',
    • This doesn't require anything specific to pothos, but your API needs to have introspection enabled, and be running when you run the code generator
  2. Use a generated graphql schema file

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@hayes
Comment options

@wakywayne
Comment options

@wakywayne
Comment options

@hayes
Comment options

@wakywayne
Comment options

Answer selected by hayes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #688 on December 02, 2022 17:29.