Diizzayy / nuxt-graphql-client

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

trouble with config, cant introspect api #356

Open dantrevino opened 10 months ago

dantrevino commented 10 months 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 4 months ago

Same ussue. Did you manage to solve the problem?