Diizzayy / nuxt-graphql-client

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

Schema generation fails when only default client provided for files suffixed with .graphql #559

Open AykutBurak opened 12 hours ago

AykutBurak commented 12 hours ago

Environment


Describe the bug

const clientInExt = /\.\w+\.gql|graphql$/.test(file) regexp in utils not working correctly for files suffixed with graphql tough it works correctly with .gql files

Expected behaviour

schema generation should work the same with graphql files as it it does with gql files

Reproduction

https://stackblitz.com/edit/nuxt-graphql-3jjvgf?file=pnpm-lock.yaml

Additional context

No response

Logs

Invalid Codegen Configuration!                                                                     11:29:44 AM

        Please make sure that your codegen config file contains the "generates" field, with a specification for the plugins you need.

        It should looks like that:

        schema:
          - my-schema.graphql
        generates:
          my-file.ts:
            - plugin1
            - plugin2
            - plugin3