Diizzayy / nuxt-graphql-client

⚡️ Minimal GraphQL Client + Code Generation for Nuxt3
https://nuxt-graphql-client.web.app
MIT License
363 stars 43 forks source link

trouble with config, cant introspect api #356

Open dantrevino opened 1 year ago

dantrevino commented 1 year ago

Environment

RootDir: /home/dan/projects/bullhorn Nuxt project info:

👉 Report an issue: https://github.com/nuxt/nuxt/issues/new
👉 Suggest an improvement: https://github.com/nuxt/nuxt/discussions/new 👉 Read documentation: https://nuxt.com

Describe the bug

  'graphql-client': {
    clients: {
      default: {
        schema: './schema.graphql',
        // host: 'https://api.test.deeplake.fi/graphql',
        // headers: {
        //   'Authorization': '<foo>',
        // }
      }
    }
  },

When using host config, I get error forbidden

 Failed to load schema from https://api.test.deeplake.fi/graphql:

        Unexpected response: "Forbidden"
        SyntaxError: Unexpected token F in JSON at position 0

Fine, download the schema and use the schema config.... then I get

 WARN  GraphQL client (default) is missing it's host.                                                                                                               nuxt-graphql-client 

¯_(ツ)_/¯

Expected behaviour

with only the schema config, expect to read the schema file and generate code.

Reproduction

No response

Additional context

No response

Logs

No response

stiflerproger commented 8 months ago

Same ussue. Did you manage to solve the problem?