Skip to content

Is it possible to use schema types? #508

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
yshui opened this issue Jan 21, 2025 · 1 comment
Open

Is it possible to use schema types? #508

yshui opened this issue Jan 21, 2025 · 1 comment

Comments

@yshui
Copy link

yshui commented Jan 21, 2025

Right now types are path based, e.g.:

query RefInfo($owner: String!, $repo: String!, $qTag: String!) {
  repository(owner: $owner, name: $repo) {
    ref(qualifiedName: $qTag) {
      name
      target {
        __typename
        oid
      }
    }
  }
}

target will have type RefInfoRepositoryRefTarget which is long. And what's more important is that if I have another query, its fields' type name will be completely different, despite it could just be the same thing, e.g. a GitObject.

Is there an option to make graphql_client generate schema types, instead of path-based types? Am I missing something?

@tomhoule
Copy link
Member

Hi @yshui , there is nothing like this in graphql-client at the moment. This could be fleshed out into an RFC for a new feature, if it's important.

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

2 participants