Skip to content

Local scheme copy for CI #505

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

Open
JulianWowra opened this issue Aug 12, 2024 · 7 comments
Open

Local scheme copy for CI #505

JulianWowra opened this issue Aug 12, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@JulianWowra
Copy link

JulianWowra commented Aug 12, 2024

Your use case

Locale schema file that Pipeline/Workflow/CI/CD does not fail if the endpoint cannot be reached.

The solution you'd like

Option to store the fetched schema file in a local configured directory.

Possible alternatives

No response

Additional information

No response


Discussion

#474

@JulianWowra JulianWowra added the enhancement New feature or request label Aug 12, 2024
@JulianWowra
Copy link
Author

By the way. The docs are incorrect.

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

  runtimeConfig: {
    public: {
      'graphql-client': {
        clients: {
          default: {
            host: '', // REQIURED "host"
            schema: '<relative_path_to_schema_file>'
          }
        }
      }
    }
  }
});

https://nuxt-graphql-client.web.app/advanced/codegen#local-schema

@LePtiDev
Copy link

LePtiDev commented Mar 15, 2025

Any news about this issue ? I got the same issue and i would like to have my schema on my repo to test it.
How did you fix that @JulianWowra ?

@JulianWowra
Copy link
Author

I am currently not aware of a fix for the problem, except to provide the schema locally via copy and paste or to have it built directly from the backend into a corresponding directory, as in my case.

@LePtiDev
Copy link

I have an idea but i need to do a PR but somebody can accepte it ? Codegen has a param to give you the choice of where you want to generate the types. If i expose this params to the nuxt config you will be able to have the types in the folder and after in the pipline to test your types. What do you think ?

@JulianWowra
Copy link
Author

A similar approach has also occurred to me. Whether it is the best approach is certainly open to debate. I do think that you can make a pull request. However, it may take longer for it to be merged. I think the maintainer is unfortunately not that active for this project

@LePtiDev
Copy link

Yes i think the same. I have some issues in production he told me he gonna resolve it but he do nothing. Do you have a similar module in mind ? I like the type generation and the auto import. We can fork it and resolve it what do you think ?

@JulianWowra
Copy link
Author

I currently do not have the capacity to create a fork of this project or contribute improvements, but feel free to improve the project. hopefully the maintainer will become more active again or hand over the project

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

No branches or pull requests

2 participants