Hi all. I have been using gqlgen for a while. I am attempting to add to a fairly large project which has been working for a while but now I am running into this error which I have not seen before. This occurs when I try to generate
generating core failed: generated!.gotpl: template: generated!.gotpl:53:38: executing "generated!.gotpl" at <$field.ComplexitySignature>: error calling ComplexitySignature: too many collisions, last attempt was graphql10
It doesnt give me too much to go off of. Where do I start to dig into the root cause of this?
go: finding module for package github.com/99designs/gqlgen/example/federation/accounts/graph/model
tidy failed: go mod tidy failed: exit status 1
exit status 3
I ant to add Gorm fields to the models fo gqlgen. I am trying to figure out where to put the modelgen hook file ad how it is used. Is there a pattern for it?
This is the documentation i am referring to -> https://gqlgen.com/recipes/modelgen-hook/
go get github.com/99designs/gqlgen
everything was fine
Hey! I put together a small sample integrating graph-gophers/dataloader with GqlGen, and IMO it's pretty straight forward. What do you guys think? Would this be worth offering as an option in the GqlGen dataloader docs?
When dealing with client requests for other resolvers, it's normal for the graphql implementations to call whatever nested resolvers were asked for without you needing to do it manually. It seems like with gqlgen, you have to embed a lot of 'if' statements to manually call other resolvers. Imagine a 'well-connected' entity like a user account which might have 10 different checks to https://gqlgen.com/reference/field-collection/ to know what nested resolvers to call. Is this correct?
If I have a query like query { A { B { C { name } } } }
do I have to embed if checks in A
for B
, and checks in B
for C
?
Is there a good resource for how to write a basic filter query while using gqlgen?
For example, if I wanted to filter all members by those with a given name, my schema might look like:
type Query {
members(name: String): [Member!]!
}
How would one cleanly handle this in the resolver? It feels like we would have to check for the name
input and then conditionally adjust the underlying SQL query based on the existence of that field by appending a WHERE name = ?
clause. That feels so clunky, I'm quite convinced I'm missing something and that there's a better way....
enum Direction {
UP = "up",
DOWN = "down",
LEFT = "left",
RIGHT = "right",
}