Open agarciabz opened 1 year ago
try node 16.
It seems cli does not work well with 18 yet.
I could be wrong.
also try this instead of localhost
schema: 'http://0.0.0.0:7021/graphql',
@zirho Hi, thanks for the suggestion but I got the same result. Plus I'm pointing to the graphql endpoint deployed in dev environment. I can't run it locally since I don't have access to the repo.
Then, would it be possible that deployed graphql server has no IntrospectionQuery
enabled?
Often times, it's disabled when it's deployed on remote servers (mostly for the production)
Were you able to see the schema on Postman or some client application to make a call?
Which packages are impacted by your issue?
@graphql-codegen/cli, @graphql-codegen/client-preset
Describe the bug
Following the documentation provided in Apollo GraphQL docs: https://www.apollographql.com/docs/react/development-testing/static-typing#setting-up-your-project I installed dependencies with a basic codegen configuration. However when running
graphql-codegen
command through npm I get the following error, which is not very useful to know what is exactly happening here.Before this I requested the backend team to enable introspection query for the GraphQL endpoint.
My current dependencies are the following:
And my codegen setup is this:
Any tips on how to debug this issue are welcome.
Your Example Website or App
Can't disclose it.
Steps to Reproduce the Bug or Issue
Expected behavior
Expected result is having typings generated in src/generated/ folder.
Screenshots or Videos
No response
Platform
graphql
version: 16.6.0@graphql-codegen/cli
version(s): 5.0.0@graphql-codegen/client-preset
version(s): 4.1.0Codegen Config File
Additional context
No response