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

unnecessary entity resolvers generated when having multiple keys even after setting resolvable: false #3028

Open
janeli1 opened this issue Apr 29, 2024 · 0 comments

Comments

@janeli1
Copy link

janeli1 commented Apr 29, 2024

What happened?

When there is only one key defined for a type and setting resolvable as false, gqlgen is able to avoid generating unnecessary entity resolver for that key.
However, when there are multiple keys defined for a type, even though I set resolvable as false, the entity resolvers are still generated for each key.

What did you expect?

After setting resolvable: false, no entity resolver to be generated for the type.

Minimal graphql.schema and models to reproduce

User subgraph/service:

type User @key(fields: "id", resolvable: false) @key(fields: "name", resolvable: false) {
  id: ID!
  name: String!
}

versions

  • go run github.com/99designs/gqlgen version?
    gqlgen@v0.17.45
  • go version?
    go version go1.22.1 X:nocoverageredesign darwin/arm64
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

1 participant