Integrate this project in already existing gqlgen project #145
-
I'm sorry for this question, I'm still learning GraphQL and Golang world. I'm using I need to "merge" other private/custom schemas to my own. But I don't want to start two different services (my own gqlgen server and nautilus/gateway) to do so. Is there a way to "integrate", in the same Golang project, gqlgen generated server and this amazing gateway? In this way I can reduce a lot the network requests: there would be only those for "external" schemas. What do you think of my idea? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I already have a: var gql = handler.GraphQL(graphql.NewExecutableSchema(graphql.Config{Resolvers: &graphql.Resolver{}}), config.GraphqlHandlerOptions) It would be amazing to use that |
Beta Was this translation helpful? Give feedback.
-
Hey @frederikhors! We actually had this exact use case and came up with a way to not have to host two separate services and still utilize the Nautilus gateway. We accomplished this by writing our own Queryer that will resolve the query using the gqlgen executable schema. It looks roughly like this:
Here, You'll need to provide a QueryerFactory. I hope this was helpful. |
Beta Was this translation helpful? Give feedback.
Hey @frederikhors! We actually had this exact use case and came up with a way to not have to host two separate services and still utilize the Nautilus gateway. We accomplished this by writing our own Queryer that will resolve the query using the gqlgen executable schema. It looks roughly like this: