Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable generating #215

Closed
mercs600 opened this issue Sep 29, 2022 · 8 comments
Closed

How to disable generating #215

mercs600 opened this issue Sep 29, 2022 · 8 comments
Assignees

Comments

@mercs600
Copy link

Hi, our graphql API does not provide introspection on the main endpoint of graphql host. Is there possibility to disable generating or setup different url to get introspection ?

@kihayu
Copy link

kihayu commented Sep 30, 2022

We have a similar situation at our company. It would be great to have the option to disable the type generation

@Diizzayy Diizzayy self-assigned this Sep 30, 2022
@Diizzayy
Copy link
Owner

@mercs600 @kihayu I've just released an experimental version that should enable this, I'd be happy to have the both of you onboard to assist in testing it if you're willing

The edge version can be installed via: yarn add nuxt-graphql-client@edge

Codegen can be disabled via: 'graphql-client'.codegen: false

@kihayu
Copy link

kihayu commented Sep 30, 2022

Thanks for the quick response. Will test it as soon as I have time

@kihayu
Copy link

kihayu commented Oct 3, 2022

When I start the dev-server and visit the page, I get the following error:

[nuxt] [request error] [unhandled] [500] request to http://[::]:3000/__nuxt_vite_node__/manifest failed, reason: connect EADDRNOTAVAIL :::3000 - Local (:::0) ()
  at async $fetchRaw2 (./node_modules/ohmyfetch/dist/shared/ohmyfetch.c2a48baf.mjs:132:20)  
  at async ./.nuxt/dev/index.mjs:457:20  
  at async ./.nuxt/dev/index.mjs:526:64  
  at async ./.nuxt/dev/index.mjs:106:22  
  at async ./node_modules/h3/dist/index.mjs:592:19  
  at async nodeHandler (./node_modules/h3/dist/index.mjs:538:7)  
  at async ufetch (./node_modules/unenv/runtime/fetch/index.mjs:9:17)  
  at async $fetchRaw2 (./node_modules/ohmyfetch/dist/shared/ohmyfetch.c2a48baf.mjs:132:20)  
  at async Object.errorhandler [as onError] (./.nuxt/dev/index.mjs:354:29)  
  at async Server.nodeHandler (./node_modules/h3/dist/index.mjs:545:9)

GraphQL server is available for sure.

@mercs600
Copy link
Author

mercs600 commented Oct 6, 2022

@Diizzayy thank you for quick response. It works for me @kihayu

@mercs600
Copy link
Author

mercs600 commented Oct 7, 2022

@Diizzayy will it be possible to provide different URL to get introspection ?

@Diizzayy
Copy link
Owner

Diizzayy commented Oct 7, 2022

will it be possible to provide different URL to get introspection ?

@mercs600 Certainly, It will be included in the next edge release.

@Diizzayy
Copy link
Owner

Diizzayy commented Oct 17, 2022

@mercs600 @Drillan767 Codegen can be disabled as of v0.2.0, by setting the codegen property of the graphql-client configuration to false.

export default defineNuxtConfig({
    modules: ['nuxt-graphql-client'],

    runtimeConfig: {
        public: {
            'graphql-client': {
              codegen: false,
                clients: {
                    spacex: 'https://api.spacex.land/graphql',
                }
            }
        }
    }
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants