Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 11:14
    grzn commented #1285
  • 00:33
    wilhelmeek labeled #1569
  • 00:27
    wilhelmeek review_requested #1623
  • 00:19
    mtibben labeled #1626
  • 00:19
    mtibben labeled #1626
  • 00:09
    mtibben closed #1624
  • Sep 18 17:40
    giuliano-oliveira synchronize #1626
  • Sep 18 17:36
    giuliano-oliveira synchronize #1626
  • Sep 18 17:34
    giuliano-oliveira edited #1626
  • Sep 18 17:33
    giuliano-oliveira edited #1625
  • Sep 18 17:31
    giuliano-oliveira opened #1626
  • Sep 18 17:27
    giuliano-oliveira opened #1625
  • Sep 18 16:01
    carldunham commented #1604
  • Sep 18 15:37
    FlymeDllVa opened #1624
  • Sep 18 11:23
    wilhelmeek edited #1623
  • Sep 18 11:23
    wilhelmeek edited #1623
  • Sep 18 11:22
    wilhelmeek edited #1623
  • Sep 18 11:09
    sundar21 commented #1552
  • Sep 18 10:37
    wilhelmeek commented #1569
  • Sep 18 10:02
    wilhelmeek synchronize #1623
Iko Uchiha
@ikouchiha47
Hi everyone

I had a question. Is it possible to have multiple query resolvers?

as in normally, there is one /query route and then one can do say
query {
companies { name }
}

but I need something like.
/companies/query
/employees/query

because I need to manage access for different user type

Iko Uchiha
@ikouchiha47
hi
in gqlgen yaml file, is there a way to have multiple resolver directory ?
Iko Uchiha
@ikouchiha47
hi
I wanted to split my schema.resolvers.go into multiple packages. across directories. right now in the yaml file, there is a config called resolver: and then it has dir:, and some follow-schema. is it possible to split this into multiple packages. otherwise when there are quite a few domains it becomes cluttery. I could split it across files, but ideally I want like people/schema.resolvers.go and companies/schema.resolvers.go for separation of concerns
Iko Uchiha
@ikouchiha47
is the question wrong?
Christopher Britz
@britztopher
wondering if there is a way in a schema directive function to know when last resolver/value is being run. I do validation for input types using directives ie minLength=1 and want to return an array of gqlerrors instead of one at a time
het jagani
@hetjagani
Hi guys, I am having really bad with some problem when I try to decode object in a middleware. I want to access the query string of a object in middleware but I am not able to do so.. You can find the details here 99designs/gqlgen#1527. Can anyone take a look at it. Thanks in advance for any help.
Wisdom Ogwu
@iammadab
Seems people don't get replied often here.
I just defined some unions in my schema file, after running generate, my generated model contained some interfaces.
But my resolvers didn't change e.g. created a union FileResult = File or Error but my resolver still returns type File
How do I make use of unions?
Wisdom Ogwu
@iammadab
Stupid me, I literally didn't change the return value in my schema to fit the union.
Fixed!
Andrew Marine
@amarine7882

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?

1 reply
Andrew Marine
@amarine7882
Our GraphQL server has a number of models where we want to bind to a method on the model instead of generating a resolver on the root resolver. like this. What is the best way to access the database from in the model? Is it possible to have the dependancies injected into the resolver also injected into the model?
Jonathan Duck
@duckbrain
Your model method can have a first argument of context.Context. We've used that to pass all sorts of values throughout our app. (DB connection, Session, Logger, etc.). An http/operation middleware can inject the values in the context for all requests.
1 reply
Anthony Lobko
@anthonylobko
Hi, new here, just wondering how to use the apollotracing handler that's listed https://github.com/99designs/gqlgen/tree/master/graphql/handler/apollotracing . I don't see it documented anywhere how to set it up, but I really wanted to see this kind of telemetry if it's supported
Anthony Lobko
@anthonylobko
Nevermind, sorted it out
Andrew Ray
@andrewray_twitter
I'm trying to figure out how to build the gqlgen project locally. I ran go generate ./... and spat out 4 package lines, then hung for 10 minutes, so I killed it
when I run it again, it spat out some error lines, and now it's hanging again
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
should I just be patient, or am I missing a step?
Andrew Ray
@andrewray_twitter
the tidy errors went away the second time I ran it, it seems to have generated successfully now
jongno-gu
@jongno-gu
Hi all. Is there any way to write "TYPE DETAILS" in playground docs?
jongno-gu
@jongno-gu

Hi all. Is there any way to write "TYPE DETAILS" in playground docs?

Scalar types has "TYPE DETAILS" but, custom types dosen't have.

John Burke
@IceeMC
Hi, I keep getting this error when running go run github.com/99designs/gqlgen generate
resolvergen: package not found for importPath: api/graphexit status 1
Dany Henriquez
@danyhenriquez:matrix.org
[m]

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/

Dany Henriquez
@danyhenriquez:matrix.org
[m]
Nevermind. The structure is clear now
Dany Henriquez
@danyhenriquez:matrix.org
[m]
/can anyone help? The auth example from the Docs is not working. The Forcontext returns nil and not the reference https://gqlgen.com/recipes/authentication/
Epo Jemba
@ejemba
Hi o/ newbie here ! I'm just playing with gqlgenc (client part). There is a models part of the config file .gqlgenc.yml that I can not understand how it works. I have the following message :
modelgen failed: unable to find type github.com/99designs/gqlgen/graphql.Float
my config file is http://ix.io/3uqf
Epo Jemba
@ejemba
ok fixed my problem myself
my project was not properly go mod initialised and after a go get github.com/99designs/gqlgen everything was fine
kvtx
@kvtx:matrix.org
[m]
anyone here?
I'm trying to figure out if i can control the call chain order of directives to ensure that one is called before another... possible?
1 reply
Eric
@elucidsoft
Hi guys, whenever I run gqlgen it throws an error saying "validation failed: packages.Load: -: no matching versions for query "latest"" I found where this was talked about in a GitHub issue, seems like it was fixed but I still get it with latest version of gqlgen. It doesn't seem to break anything, everything is still generated perfectly fine.
Mojtaba Cazi
@mojtabacazi
Hello, is there a way to know if an error generated by gqlgen was a client error (aka request error) or a field error ?
Zen Yui
@zenyui

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?

https://github.com/zenyui/gqlgen-dataloader

zhaoyta
@zhaoyta
hi
is gqlgen has directive that lick apollo export directive
zhaoyta
@zhaoyta
hi
Davae Wanliss
@davae1an
hello
keep getting weird errors in sub fields that are manged by a federated schema
invalid character '$' looking for beginning of value
it seems to be an unmarshall error
Luke Cawood
@lwc
hey everyone, we're moving gqlgen chat to discord, here's an invite link :) https://discord.gg/DYEq3EMs4U
Davae Wanliss
@davae1an
oh
thnx