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

RFC: incremental delivery with deduplication + concurrent execution #1034

Closed
wants to merge 65 commits into from

Commits on Jan 15, 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 <benjie@jemjie.com>
    
    missing bracket
    
    Update spec/Section 7 -- Response.md
    
    Co-authored-by: Benjie Gillam <benjie@jemjie.com>
    
    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 <benjie@jemjie.com>
    
    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 <benjie@jemjie.com>
    
    # Conflicts:
    #	spec/Section 3 -- Type System.md
    #	spec/Section 5 -- Validation.md
    #	spec/Section 6 -- Execution.md
    #	spec/Section 7 -- Response.md
    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    fca1c5d View commit details
    Browse the repository at this point in the history
  2. fix typos

    # Conflicts:
    #	spec/Section 6 -- Execution.md
    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    43e9997 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    cb5a3f4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0eb4426 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    43bfe01 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    acb5bf0 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    abea59b 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    139d69f View commit details
    Browse the repository at this point in the history
  9. fix typo

    # Conflicts:
    #	spec/Section 7 -- Response.md
    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    de5004b 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    9e89f42 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    f894ba3 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    08053d7 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    e19246b 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    2ecd0af View commit details
    Browse the repository at this point in the history
  15. Clarify error handling

    # Conflicts:
    #	spec/Section 6 -- Execution.md
    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    337bb87 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    2982dec View commit details
    Browse the repository at this point in the history
  17. fix typo

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    32fb73b View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    1ff999e View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    270b409 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    75f2258 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    d8c28d1 View commit details
    Browse the repository at this point in the history
  22. Clarification on labels

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

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    f2b50bf View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    92f02f3 View commit details
    Browse the repository at this point in the history
  25. add missing line

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    049bce8 View commit details
    Browse the repository at this point in the history
  26. fix ExecuteRequest

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    9a07500 View commit details
    Browse the repository at this point in the history
  27. fix response

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    7c5e1da View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    19cb9c3 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    c747f61 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    6f3c715 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    7c9ea0a View commit details
    Browse the repository at this point in the history
  32. fix typos

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

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    1ad7e9c View commit details
    Browse the repository at this point in the history
  34. address pr feedback

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    4b6554e View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    9103fdb View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    3944d05 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    90b31ae View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    f1c0ec2 View commit details
    Browse the repository at this point in the history
  39. link to path section

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    3830406 View commit details
    Browse the repository at this point in the history
  40. use case no dash

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

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    ad5b2e2 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    c1f3f65 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    2e41749 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    abb14a0 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    4ea2a34 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    1565491 View commit details
    Browse the repository at this point in the history
  47. typo

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    a938f44 View commit details
    Browse the repository at this point in the history
  48. improve non-null example

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    a301f21 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    38bfbb9 View commit details
    Browse the repository at this point in the history
  50. link to note on should

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    8d07dee View commit details
    Browse the repository at this point in the history
  51. update on hasNext

    robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    008818d 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    4adb05a 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    ddd0fd7 View commit details
    Browse the repository at this point in the history
  54. fix typos (graphql#6)

    * fix whitespace
    
    * complete renaming of initialItems
    yaacovCR authored and robrichard committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    b54c9fe 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 Jan 15, 2023
    Configuration menu
    Copy the full SHA
    02d4676 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    3e74250 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    cb3ab46 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    24cf072 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    d74430c View commit details
    Browse the repository at this point in the history
  60. fix typo

    Co-authored-by: Simon Gellis <82392336+simongellis-attentive@users.noreply.github.com>
    robrichard and simongellis-attentive committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    79da712 View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    8df13da View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2023

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

Commits on Jul 18, 2023

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

Commits on Sep 28, 2023

  1. Configuration menu
    Copy the full SHA
    831b10c View commit details
    Browse the repository at this point in the history
  2. use identifiers instead of records when possible

    only the Incremental Publisher subroutines need to maintain records
    yaacovCR committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    813ea2c View commit details
    Browse the repository at this point in the history