-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add config for remote schemas #207
Comments
I see a bunch of thumbs up here -- thanks for filing the issue and for those who expressed interest. It should be easy enough to do a simple version of this (PRs are welcome or I may have time eventually), but my question is whether that's enough. For those who were interested, is just fetching the file from a fixed URL as a GET with no auth sufficient for you, or would you also need a way to configure the fetch further? |
For my use case, I would need to specify custom headers for auth and specifying user roles. Specifying method GET/POST may also be needed. Here is what I am used to in JS environment: |
I would also love to see this feature. My use case is I have a running Dgraph database, which has a running (and Dgraph augmented) schema. This includes many mutations and queries. The issue is pulling this from the local dev dgraph install, which is my problem to set up of course. I can use the npm tool |
@Diaga thanks for the links to the JS version, that will be a helpful reference! @skandragon if you're fetching from a local install, is that on a fixed IP/port? Is that SDL format or introspection query? I think supporting via introspection query is going to be a fair amount of work, because we'd have to implement the transform in Go. If someone wants to do it (or better if there's a package we can pull in), that would be great, but I expect fetching SDL will be the first step. |
What I really want is a way to take the SDL format input, and have what dgraph would use as output, on the command line. My work flow is currently:
I cannot feed the user-side schema I write to genqlicent, as it will not have all the components needed. I cannot feed the user-side + dgraph fragment for IDEs in, as that won't generate the queries or mutations. So, my option is to submit to dgraph, and pull the resulting full schema out. I'd really just like to do that without running dgraph, although I will then run dgraph for my unit tests of course. |
Is your feature request related to a problem? Please describe.
I don't want to have to manually update the schema.graphql file.
Describe the solution you'd like
Add
RemoteSchemaURL
togenerate/config.go
. Temporarily download this file to disk for generation.Describe alternatives you've considered
I currently have a ci job to download the remote schema and compare it to the schema in my project
The text was updated successfully, but these errors were encountered: