-
Notifications
You must be signed in to change notification settings - Fork 2
How do you use this library? Please tell me to help improve it! #4
Comments
I think ,it may use like k8s-ingress client -> loadbalance -> k8s-ingress -> service client -> loadbalance -> graphql-gateway -> service |
@jensneuse Hi! I was wondering if you are continuing this as part of the Tyk Gateway. |
Hey, thanks for asking. Yes, you're absolutely right. The first version actually got just shipped a few days ago. You can test it out in the cloud version. It's capable of protecting existing graphql APIs as well as stitching together GraphQL and REST APIs. More datasources to come. So it's basically the functionality of this repo here with some advanced security features like field level permissions etc. plus a GUI to configure everything rather than annotating schemas with directives. Let me know if you have any questions or want to get into contact with a consulting engineer at tyk to get you started. |
There's a general discussion about DGraph and different federation techniques happening over at dgraph-io/dgraph#4724 that I mentioned your work. |
Hi!
Ideally, a really small config would be required: servers:
- serverA: 127.0.0.1:3000
- serverB: 127.0.0.1:3001
port: 3002 |
Actually, I'm currently working on exactly this. It'll support GraphQL Federation + Schema stitching. Will keep you posted. |
That's awesome! Will it support subscriptions from the beginning? |
Subscriptions, @defer and @stream will be supported from the beginning. I'd say the biggest difference against existing solutions is that we're compiling Queries. Another difference is the flexibility of data sources. We'll support GraphQL Schema Stitching, GraphQL Federation and REST APIs from the beginning. Later on, we'll add support for SOAP, OData, Kafka, RabbitMQ, NATS etc. We'll also add Authentication, Authorization & Caching and an additional Code Generator so that you don't even have to write client code yourself. Just write a query, annotate it with a directive and that's it. |
@jensneuse I updated the Apollo Federation to run four Go GraphQL (gqlgen) Services federated behind the Apollo Gateway, over here: federation demo I would like to set up your gateway as a replacement for the Apollo Gateway. Do you have an example of how to do this? |
Looks great! In the meantime, would you like to add an extra branch with subscriptions? |
I'm going to play around with swapping out some of the services with DGraph, so I don't think I'll get around to adding a subscriptions branch before the holidays, but you are welcome to do so! I'd love to be able to try that out! |
If you replace them with DGraph, does this mean they will no longer come with federation? |
If so, then that would be a deal breaker for me and I wouldn't push the changes, or I would leave them on a branch. DGraph supports subscriptions, so ideally I would like a federated set of services including DGraph with a gateway that supported subscriptions (yours). I'll let you know what I find out though. |
It's nothing I can promise before Q1 2021 but I'm actually looking into a way to make non-federated services federated without changing them. It's just a matter of configuration and then rewriting the queries so that the participants behave like federated graphql servers even when they don't implement the spec themselves. |
Hmm, so I would love to be able to use wundergraph/graphql-go-tools#22 to add a proxy in front of DGraph 's GraphQL that would make it support Apollo Federation. Basically like Using Apollo Federation with Local Schemas (Repo) but in Go instead of Node.JS. I thought I would ask before diving into trying it myself in case you already did that and it's laying around somewhere convenient. |
Yeah, I can and will make that happen. |
Based on federation demo, the combined schema is:
I would like to replace the Product service with DGraph behind a federate-able proxy:
This DGraph does not support Apollo Federation, but is otherwise GraphQL native. The I'm not sure that creating stub types for references would be required for this specific example. Does that clarify things? |
@StevenACoffman I guess, DGraph doesn't offer the root query field topProducts, right? |
@StevenACoffman have a look at this: |
It's worth looking at this Dgraph forum thread Dgraph Directives reference (for other tools)? as they've recently added Apollo Federation support:
I have a similar use case to @StevenACoffman where I need to put something in front of Dgraph, either a proxy or federate it, but also need to add some additional business logic GraphQL endpoints which in turn also use data from Dgraph. At the moment I'm wondering if this is best done by creating a proxy (hence looking at I've also been looking at pulling the expanded GraphQL schema out of Dgraph (see the query above) and using that to generate much of the boilerplate. e.g. using a combination of something like gqlgen and gqlgenc. More documentation and some examples would really help my understanding of |
I did find I’m writing a graphql proxy. (How) Would you use one? which has example code is in this branch which seem to have been merged in wundergraph/graphql-go-tools#22 ... but the proxy and example middleware directories don't seem to exist on master any more? I'm guessing this was split into |
Your use case sounds very interesting. I'd love to have a chat and see how I might help: https://calendly.com/jens-neuse |
So I took the Apollo Federation demo that had already been ported to Go + gqlgen, and updated it. It looks like you have Gateway support now (woohoo!) in this example. This is pretty cool, as it opens up a variety of pure-Go options for Federation! |
I'm not sure which is more appropriate to ask in, wundergraph/graphql-go-tools#243 I put a question about why the schema is different in the federation example in that repository. |
this codebase here is deprecated, conversations should happen on the other repo. |
As the title says, please tell me how you use graphql-gateway. This helps me better understand your use case and evolve it in the right direction. It's open source so any feedback is well appreciated.
If you think graphql-gateway is not exactly what you're looking for you might be interested to look at the library on which graphql-gateway is based on: https://github.com/jensneuse/graphql-go-tools
The text was updated successfully, but these errors were encountered: