Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec edits for @defer/@stream #742

Closed
wants to merge 62 commits into from
Closed

Commits on Aug 31, 2023

  1. Introduce @defer and @stream.

    Update Section 3 -- Type System.md
    
    Update Section 3 -- Type System.md
    
    Update Section 3 -- Type System.md
    
    Update Section 6 -- Execution.md
    
    Update Section 6 -- Execution.md
    
    Update Section 6 -- Execution.md
    
    Update Section 6 -- Execution.md
    
    Update Section 6 -- Execution.md
    
    Update Section 6 -- Execution.md
    
    Update Section 6 -- Execution.md
    
    Update Section 6 -- Execution.md
    
    Update Section 6 -- Execution.md
    
    Amend changes
    
    change initial_count to initialCount
    
    add payload fields to Response section
    
    add stream validation for overlapping fields
    
    spelling updates
    
    add note about re-execution
    
    add note about final payloads
    
    label is optional
    
    fix build
    
    Update ExecuteQuery with hasNext logic
    
    fix spelling
    
    fix spaces
    
    Update execution to add defer/stream to mutations and subscriptions
    
    clarify stream records
    
    Apply suggestions from code review
    
    Co-authored-by: Benjie Gillam <[email protected]>
    
    missing bracket
    
    Update spec/Section 7 -- Response.md
    
    Co-authored-by: Benjie Gillam <[email protected]>
    
    clarify line about stream record iterator
    
    update visitedFragments with defer
    
    Updates to consolidate subsequent payload logic for queries, mutations, and subscriptions
    
    Apply suggestions from code review
    
    Co-authored-by: Benjie Gillam <[email protected]>
    
    address review feedback
    
    Add handling of termination signal
    
    more formatting
    
    fix spelling
    
    Add assertion for record type
    
    add "Stream Directives Are Used On List Fields" validation rule
    
    Add defaultValue to @stream initialCount
    
    Update spec/Section 5 -- Validation.md
    
    Co-authored-by: Benjie Gillam <[email protected]>
    
    # Conflicts:
    #	spec/Section 3 -- Type System.md
    #	spec/Section 5 -- Validation.md
    #	spec/Section 6 -- Execution.md
    #	spec/Section 7 -- Response.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    42bd98a View commit details
    Browse the repository at this point in the history
  2. fix typos

    # Conflicts:
    #	spec/Section 6 -- Execution.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    583acb6 View commit details
    Browse the repository at this point in the history
  3. clear up that it is legal to support either defer or stream individually

    # Conflicts:
    #	spec/Section 3 -- Type System.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    a4bbad6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b4fb65c View commit details
    Browse the repository at this point in the history
  5. Update Section 3 -- Type System.md

    # Conflicts:
    #	spec/Section 3 -- Type System.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    3257f19 View commit details
    Browse the repository at this point in the history
  6. clarification on defer/stream requirement

    # Conflicts:
    #	spec/Section 3 -- Type System.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    3cce3fa View commit details
    Browse the repository at this point in the history
  7. clarify negative values of initialCount

    # Conflicts:
    #	spec/Section 3 -- Type System.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    f81d745 View commit details
    Browse the repository at this point in the history
  8. allow extensions only subsequent payloads

    # Conflicts:
    #	spec/Section 7 -- Response.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    b0cae7f View commit details
    Browse the repository at this point in the history
  9. fix typo

    # Conflicts:
    #	spec/Section 7 -- Response.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    9449853 View commit details
    Browse the repository at this point in the history
  10. Raise a field error if initialCount is less than zero

    # Conflicts:
    #	spec/Section 3 -- Type System.md
    #	spec/Section 6 -- Execution.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    c812890 View commit details
    Browse the repository at this point in the history
  11. data is not necessarily an object in subsequent payloads

    # Conflicts:
    #	spec/Section 7 -- Response.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    c1fefe4 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    6dd9b79 View commit details
    Browse the repository at this point in the history
  13. wait for parent async record to ensure correct order of payloads

    # Conflicts:
    #	spec/Section 6 -- Execution.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    ebfefb6 View commit details
    Browse the repository at this point in the history
  14. Simplify execution, payloads should begin execution immediately

    # Conflicts:
    #	spec/Section 6 -- Execution.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    30674c8 View commit details
    Browse the repository at this point in the history
  15. Clarify error handling

    # Conflicts:
    #	spec/Section 6 -- Execution.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    101516b View commit details
    Browse the repository at this point in the history
  16. add isCompletedIterator to AsyncPayloadRecord to track completed iter…

    …ators
    
    # Conflicts:
    #	spec/Section 6 -- Execution.md
    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    80ff450 View commit details
    Browse the repository at this point in the history
  17. fix typo

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    b73af22 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    f634192 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    7eafac8 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    83e058d View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    5aa915b View commit details
    Browse the repository at this point in the history
  22. Clarification on labels

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    d7fe43a View commit details
    Browse the repository at this point in the history
  23. fix wrong quotes

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    379f10c View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    1ffad84 View commit details
    Browse the repository at this point in the history
  25. add missing line

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    21dd0bc View commit details
    Browse the repository at this point in the history
  26. fix ExecuteRequest

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    3a569b6 View commit details
    Browse the repository at this point in the history
  27. fix response

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    a596ead View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    4543a47 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    5a093cd View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    8fa426e View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    fcc6393 View commit details
    Browse the repository at this point in the history
  32. fix typos

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    aa22c5f View commit details
    Browse the repository at this point in the history
  33. if: Boolean! = true

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    089d06c View commit details
    Browse the repository at this point in the history
  34. address pr feedback

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    a154bda View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    67689c5 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    9230085 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    4bf09d0 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    1499e64 View commit details
    Browse the repository at this point in the history
  39. link to path section

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    722de48 View commit details
    Browse the repository at this point in the history
  40. use case no dash

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    c4bdfaf View commit details
    Browse the repository at this point in the history
  41. remove "or null"

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    d84dd0b View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    2248f35 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    2fb409c View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    66c3f7b View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    9287b62 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    e0c0ad9 View commit details
    Browse the repository at this point in the history
  47. typo

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    99baf54 View commit details
    Browse the repository at this point in the history
  48. improve non-null example

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    4931f7a View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    da96e98 View commit details
    Browse the repository at this point in the history
  50. link to note on should

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    aff1113 View commit details
    Browse the repository at this point in the history
  51. update on hasNext

    robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    fb3e05c View commit details
    Browse the repository at this point in the history
  52. small fixes (#3)

    * add comma
    
    * remove unused parameter
    yaacovCR authored and robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    039e4eb View commit details
    Browse the repository at this point in the history
  53. remove ResolveFIeldGenerator (#4)

    * streamline stream execution
    
    Currently, these spec changes introduce a new internal function named `ResolveFieldGenerator` that is suggested parallels `ResolveFieldValue`. This function is used  during field execution such that if the stream directive is specified, it is called instead of `ResolveFieldValue`.
    
    The reference implementation, however, does not require any such function, simply utilizing the result of `ResolveFieldValue`.
    
    With incremental delivery, collections completed by `CompleteValue` should be explicitly iterated using a well-defined iterator, such that the iterator can be passed to `ExecuteStreamField`. But this does not require a new internal function to be specified/exposed.
    
    Moreover, introducing this function causes a mixing of concerns between the `ExecuteField` and `CompleteValue` algorithms; Currently, if stream is specified for a field, `ExecuteField` extracts the iterator and passes it to `CompleteValue`, while if stream is not specified, the `ExecuteField` passes the collection, i.e. the iterable, not the iterator. In the stream case, this shunts some of the logic checking the validity of resolution results into field execution. In fact, it exposes a specification "bug" => in the stream case, no checking is actually done that `ResolveFieldGenerator` returns an iterator!
    
    This change removes `ResolveFieldGenerator` and with it some complexity, and brings it in line with the reference implementation.
    
    The reference implementation contains some simplification of the algorithm for the synchronous iterator case (we don't have to preserve the iterator on the StreamRecord, because there will be no early close required and we don't have to set isCompletedIterator, beacuse we don't have to create a dummy payload for termination of the asynchronous stream), We could consider also removing these bits as well, as they are an implementation detail in terms of how our dispatcher is managing its iterators, but that should be left for another change.
    
    * run prettier
    yaacovCR authored and robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    777c21b View commit details
    Browse the repository at this point in the history
  54. fix typos (#6)

    * fix whitespace
    
    * complete renaming of initialItems
    yaacovCR authored and robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    7626800 View commit details
    Browse the repository at this point in the history
  55. Add error handling for stream iterators (#5)

    * Add error handling for stream iterators
    
    * also add iterator error handling within CompleteValue
    
    * incorporate feedback
    yaacovCR authored and robrichard committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    d16a432 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    979e581 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    1207121 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    6545a55 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    4c2e3f9 View commit details
    Browse the repository at this point in the history
  60. fix typo

    Co-authored-by: Simon Gellis <[email protected]>
    robrichard and simongellis-attentive committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    e4ee3eb View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    22de5de View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    c630301 View commit details
    Browse the repository at this point in the history