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

deferred fragments should not change ordering of fields within initial response #1054

Draft
wants to merge 64 commits into
base: main
Choose a base branch
from

Commits on Nov 18, 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 authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    20dfd3b View commit details
    Browse the repository at this point in the history
  2. fix typos

    # Conflicts:
    #	spec/Section 6 -- Execution.md
    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    3f00596 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 authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    c861c36 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d56f4e4 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 authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    b284063 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 authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    1359002 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 authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    ce89ed0 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 authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    8297aff View commit details
    Browse the repository at this point in the history
  9. fix typo

    # Conflicts:
    #	spec/Section 7 -- Response.md
    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    67351bd 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 authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    5365ed4 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 authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    947b944 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    23ed896 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 authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    cb2330f 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 authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    a20f9ef View commit details
    Browse the repository at this point in the history
  15. Clarify error handling

    # Conflicts:
    #	spec/Section 6 -- Execution.md
    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    192f735 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 authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    1e402c0 View commit details
    Browse the repository at this point in the history
  17. fix typo

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    32fe878 View commit details
    Browse the repository at this point in the history
  18. deferDirective and visitedFragments

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    05f6007 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    4b6677a View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    a562876 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    274110d View commit details
    Browse the repository at this point in the history
  22. Clarification on labels

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    1c79905 View commit details
    Browse the repository at this point in the history
  23. fix wrong quotes

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    f912d67 View commit details
    Browse the repository at this point in the history
  24. remove label/path requirement

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    a2d730e View commit details
    Browse the repository at this point in the history
  25. add missing line

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    e2b5227 View commit details
    Browse the repository at this point in the history
  26. fix ExecuteRequest

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    b25627f View commit details
    Browse the repository at this point in the history
  27. fix response

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    58dda17 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    1d0e755 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    7b703dd View commit details
    Browse the repository at this point in the history
  30. Note about mutation execution order

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    47e1afa View commit details
    Browse the repository at this point in the history
  31. minor change for uniqueness

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    fc297c3 View commit details
    Browse the repository at this point in the history
  32. fix typos

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    1a6d018 View commit details
    Browse the repository at this point in the history
  33. if: Boolean! = true

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    f4b38d1 View commit details
    Browse the repository at this point in the history
  34. address pr feedback

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    437863f View commit details
    Browse the repository at this point in the history
  35. clarify null behavior of if

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    43602e5 View commit details
    Browse the repository at this point in the history
  36. Add error boundary behavior

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    8c8a7f5 View commit details
    Browse the repository at this point in the history
  37. defer/stream response => payload

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    7e142aa View commit details
    Browse the repository at this point in the history
  38. event stream => response stream

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    24968e0 View commit details
    Browse the repository at this point in the history
  39. link to path section

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    1174b4b View commit details
    Browse the repository at this point in the history
  40. use case no dash

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    0ee9f40 View commit details
    Browse the repository at this point in the history
  41. remove "or null"

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    7a61ccb View commit details
    Browse the repository at this point in the history
  42. add detailed incremental example

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    46c7476 View commit details
    Browse the repository at this point in the history
  43. update label validation rule

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    d07dc88 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    6861159 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    f760bc1 View commit details
    Browse the repository at this point in the history
  46. Add examples for non-null cases

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    f021320 View commit details
    Browse the repository at this point in the history
  47. typo

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    befc057 View commit details
    Browse the repository at this point in the history
  48. improve non-null example

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    c658f77 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    7ae29d8 View commit details
    Browse the repository at this point in the history
  50. link to note on should

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    bece8a0 View commit details
    Browse the repository at this point in the history
  51. update on hasNext

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    056c77d View commit details
    Browse the repository at this point in the history
  52. small fixes (#3)

    * add comma
    
    * remove unused parameter
    yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    fae5cdd 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 committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    cc1a7a2 View commit details
    Browse the repository at this point in the history
  54. fix typos (graphql#6)

    * fix whitespace
    
    * complete renaming of initialItems
    yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    185374a 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 committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    57ec651 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    feab837 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    f5398fb View commit details
    Browse the repository at this point in the history
  58. clarify label is not required

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    53215c5 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    f73fdff View commit details
    Browse the repository at this point in the history
  60. fix typo

    Co-authored-by: Simon Gellis <[email protected]>
    2 people authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    fe25ae6 View commit details
    Browse the repository at this point in the history
  61. replace server with service

    robrichard authored and yaacovCR committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    dbd266a View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    991f223 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. incremental delivery with deduplication of delivery and execution, al…

    …lowing early delivery
    yaacovCR committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    c7804cf View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2023

  1. Configuration menu
    Copy the full SHA
    9b274db View commit details
    Browse the repository at this point in the history