ardatan / ardatan/graphql-tools
Remapping root fields from query to mutation with wrap tools
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 830
- Avg merge
- 10h 59m
- Merged PRs (30d)
- 45
Description
Hello
I am working with schema generated from REST endpoint using swagger-to-graphql. It works fine, but all GET operations are mapped as queries, and POST operations as mutations in the graphql schema. Many of those GET operations do things like remove or update items. And many POST operations do things like search for results.
Working with it in apollo is a bit weird, so I was hoping to be able to remap some of the queries to mutations, and some mutations to queries using @graphql-tools/wrap.
I have looked at the docs and tried various functions but I'm unable find solution to do this in an easy way. Is this supported, or is it possible to add support for this use case ?
Contributor guide
Research direction
Start by reviewing the @graphql-tools/wrap documentation and the existing wrapping APIs used with schemas generated by swagger-to-graphql. Determine whether selected root fields can be remapped between queries and mutations, and define the supported behavior and tests needed for the requested use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100