graphql-spec icon indicating copy to clipboard operation
graphql-spec copied to clipboard

add note regarding the normative force of directives

Open yaacovCR opened this issue 4 years ago β€’ 6 comments

This is to better anticipate the nature of defer/stream directives as client side recommendations rather than mandates.

yaacovCR avatar Dec 10 '21 07:12 yaacovCR

βœ”οΈ Deploy Preview for graphql-spec-draft ready!

πŸ”¨ Explore the source changes: cab72fda9be1b493cded257aaec9a501e880b1f3

πŸ” Inspect the deploy log: https://app.netlify.com/sites/graphql-spec-draft/deploys/61d84c50111d880008a53e4d

😎 Browse the preview: https://deploy-preview-908--graphql-spec-draft.netlify.app/draft

netlify[bot] avatar Dec 10 '21 07:12 netlify[bot]

Exact language requires some changes, this is just a temporary placeholder so I don’t forget about it, other thoughts also welcome of course!

yaacovCR avatar Dec 10 '21 07:12 yaacovCR

Directives "direct" behavior only indirectly, by providing information. Directive "direct" behavior, but do not mandate it.

The existing specified directives that change execution behavior have "must" language attached (skip, include), but custom directives, and potentially future specified directives (defer/stream), may have only "should" language.

yaacovCR avatar Dec 11 '21 20:12 yaacovCR

https://github.com/robrichard/defer-stream-wg/discussions/7

yaacovCR avatar Dec 11 '21 20:12 yaacovCR

Is there an existing paragraph we should be rewording such that new readers of the spec come to the understanding that we're trying to get to?

Basically: what existing text is likely to cause confusion, and is the reason we feel like we need this additional paragraph?

mjmahone avatar Jan 06 '22 19:01 mjmahone

Is there an existing paragraph we should be rewording such that new readers of the spec come to the understanding that we're trying to get to?

Basically: what existing text is likely to cause confusion, and is the reason we feel like we need this additional paragraph?

I don't think there is existing test that causes confusion -- I think it's more like the basic confusion raised in the working group. Tools (such as validators, executors) MUST respect all directives, but only at the normative level at which they are defined, which can vary. Spec directives (skip, include) describe MUST behavior, future planned directives are at SHOULD (defer/stream, to allow for advanced performance enhancing behavior by custom servers) and future directives could (but probably won't?) be at some other normative level.

Spec and custom directives themselves describe metadata, and so as "specified" within the spec or by a potential "specifiedByURL", they have variable normative force.

yaacovCR avatar Jan 07 '22 08:01 yaacovCR