ardatan / ardatan/graphql-tools
requireResolversForArgs incorrectly labelled as missing with subscription args
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 830
- Avg merge
- 10h 59m
- Merged PRs (30d)
- 45
Description
**Describe the bug**
When arguments are added to the subscription type on the graphQL schema the requireResolversForArgs is incorrectly erroring.
```graphql
type Subscription {
numberIncremented(id: Int): Int
}
```
`Resolver missing for "Subscription.numberIncremented".`
**To Reproduce**
Example forked from official Apollo-server example:
https://codesandbox.io/s/pensive-joliot-brxcj?file=/index.js
**Expected behavior**
If arguments taken off the subscription type in the schema, everything works fine.
- OS:
- `@graphql-tools/...`: 7.1.5
Contributor guide
Research direction
Start with the provided CodeSandbox reproduction, especially index.js, and trace the requireResolversForArgs validation for Subscription.numberIncremented when the field has an id argument. Confirm the failure against @graphql-tools version 7.1.5 and verify that the subscription schema no longer reports a missing resolver while the argument remains present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100