-
Notifications
You must be signed in to change notification settings - Fork 348
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 additionalResolvers example for passing args to nested fields #779
Comments
@rboyd Could you create a minimal reproduction so we can work on it and make sure it works before asking you to test it ? :) |
@rboyd, I've taken a look at your JavaScript snippet, and there is a problem with it. It has syntax errors. I've written a version of your script that does not have syntax errors and runs fine on Node.js, and you can see the attached screenshots for clarification. RUNNING ORIGINAL CODE: https://ibb.co/t3Cxk3n Here is the modified code:
|
@Frederico-Miranda thank you -- with a graphql query:
I get:
here is my
I'm using docker image https://hub.docker.com/r/mewil/elastic-graphql partial docker-compose:
|
@rboyd Could you create a repo? |
…n#779) Co-authored-by: Renovate Bot <[email protected]>
I am trying to use it to wrap a remote schema in a container running https://github.com/graphql-compose/graphql-compose-elasticsearch (graphql queries to elasticsearch).
For my case I need to restrict the indices that a client can query. I'm stuck on how to use additionalResolvers to pass args to a nested field.
Here's a query example against target: https://imgur.com/a/tDVT8bC and my attempt so far: https://gist.github.com/rboyd/f67d5efc03221bb936926fdc0d33201f (line 6 where I try elastic.api.elastic.search) I'm not sure where to find docs or impl of what the api function expects for args.
The text was updated successfully, but these errors were encountered: