Martmists-GH / Martmists-GH/multiplatform-everything
[GraphQL] Support @skip and @include directives
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 10
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
https://spec.graphql.org/October2021/#sec-Type-System.Directives
skip
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
The @skip built-in directive may be provided for fields, fragment spreads,
and inline fragments, and allows for conditional exclusion during execution as
described by the if argument.
In this example experimentalField will only be queried if the variable
$someTest has the value false.
query myQuery($someTest: Boolean!) {
experimentalField @skip(if: $someTest)
}
include
directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
The @include built-in directive may be provided for fields, fragment
spreads, and inline fragments, and allows for conditional inclusion during
execution as described by the if argument.
In this example experimentalField will only be queried if the variable
$someTest has the value true
query myQuery($someTest: Boolean!) {
experimentalField @include(if: $someTest)
}
Note: Neither
@skipnor@includehas precedence over the other. In the case
that both the@skipand@includedirectives are provided on the same
field or fragment, it must be queried only if the@skipcondition is false
and the@includecondition is true. Stated conversely, the field or fragment
must not be queried if either the@skipcondition is true or the
@includecondition is false.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked October 2021 GraphQL specification sections for the built-in @skip and @include directives. Trace the repository's GraphQL directive validation and execution entry points, then verify that fields, fragment spreads, and inline fragments follow both conditions and the stated combined behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, kotlin
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100