ardatan / ardatan/graphql-mesh

Add additionalResolvers example for passing args to nested fields

Open
#779 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
3.5k
Forks
363
Avg merge
6h 10m
Merged PRs (30d)
19

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the additionalResolvers usage in the linked gist, especially line 6, and compare it with the remote-schema and nested-field behavior shown in the issue. Document an additionalResolvers example that passes arguments to the nested field and demonstrates restricting the Elasticsearch indices; the example should make the expected API arguments clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, typescript
Domain
api, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.