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

Add support for @defer directive #1287

Closed
wants to merge 64 commits into from
Closed

Add support for @defer directive #1287

wants to merge 64 commits into from

Commits on Jul 26, 2018

  1. Bootstrap apollo-server-defer package, cloning execute.js of graphql.js

    It is easier to import everything first and trim it down from there.
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    52b3844 View commit details
    Browse the repository at this point in the history
  2. Converted flow to Typescript

    To make sure that the baseline implementation works, I copied and run
    tests from graphql.js
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    2c3cb8e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cc7f24a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dfbf04e View commit details
    Browse the repository at this point in the history
  5. Use the ExecutionContext to store observables that are returned from

    deferred fields.
    Multiple observables from deferred fields will be merged and returned as
    a single observable.
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    c5c93b1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    57707db View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e799392 View commit details
    Browse the repository at this point in the history
  8. Fix types, temporarily turn off typescript strict mode

    The issue here is that some errors stem from graphql.js which was
    written in flow. Eventually, we will import utility functions from
    graphql.js, instead from porting them over to typescript, so ignore
    them for now.
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    20b6ccb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    43e4e97 View commit details
    Browse the repository at this point in the history
  10. Ensure that nested @defer's are resolved correctly

    Reuse the same observer for all nested deferred fields, instead of
    creating a new Observable for each.
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    d51699b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f85595e View commit details
    Browse the repository at this point in the history
  12. Add test cases

    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    abe6206 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    af73b35 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    396554d View commit details
    Browse the repository at this point in the history
  15. Minor fixes

    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    0f4224f View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    3189bd9 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    bfdcfe5 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    214378a View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    8b2b198 View commit details
    Browse the repository at this point in the history
  20. Update README.md

    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    6c60495 View commit details
    Browse the repository at this point in the history
  21. Stream deferred responses using multipart HTTP

    Compared to websockets, this provides a much cleaner upgrade path for
    users who want @defer support, and has lower overhead. Changes also made
    to `apollo-link-http` into order to parse multipart responses according
    to the spec: https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    6cebaf6 View commit details
    Browse the repository at this point in the history
  22. Ensure ordering of nested patches

    This commit adds the concept of a PatchBundle, a recursive structure
    that expresses the ordering dependencies between patches.
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    3dc9d20 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    9f979c9 View commit details
    Browse the repository at this point in the history
  24. Refactored runHttpQuery for backward compatibility

    Other integration libraries depend on `HttpQueryResponse` interface,
    so instead of making breaking changes to it, I added `graphqlResponses`
    field that will be used for returning an AsyncIterable of response
    strings.
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    7d0783f View commit details
    Browse the repository at this point in the history
  25. Fix typescript errors

    The build was previously failing because `execute.ts` was poorly typed
    and would fail under strict mode. Disable that first until I get around
    to refactoring flow code properly.
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    beeee71 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    ca65031 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    e7a68fe View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    a22e1ab View commit details
    Browse the repository at this point in the history
  29. Minor fix

    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    81d9605 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    80b6042 View commit details
    Browse the repository at this point in the history
  31. Update README.md

    Clarence Ngoh authored and clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    75aad01 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    5457f02 View commit details
    Browse the repository at this point in the history
  33. Update README.md

    Clarence Ngoh authored and clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    69623a3 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    a30be2e View commit details
    Browse the repository at this point in the history
  35. Publish

     - apollo-server-core@2.1.0-alpha.5
     - apollo-server-express@2.1.0-alpha.5
     - apollo-server@2.1.0-alpha.5
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    9cc6861 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    c323a99 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    4a9a48e View commit details
    Browse the repository at this point in the history
  38. Publish

     - apollo-server-core@2.1.0-alpha.6
     - apollo-server-express@2.1.0-alpha.6
     - apollo-server@2.1.0-alpha.6
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    4d2bb03 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    6cbe08f View commit details
    Browse the repository at this point in the history
  40. Apollo Server variants must explicitly enable defer

    Otherwise any @defer directives will be ignored.
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    d4fe896 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    996a3f7 View commit details
    Browse the repository at this point in the history
  42. Update defer spec

    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    228425e View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    67655b0 View commit details
    Browse the repository at this point in the history
  44. Bug fix

    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    c3215ef View commit details
    Browse the repository at this point in the history
  45. Publish

     - apollo-server-core@2.1.0-alpha.7
     - apollo-server-express@2.1.0-alpha.7
     - apollo-server-hapi@2.1.0-alpha.7
     - apollo-server-koa@2.1.0-alpha.7
     - apollo-server@2.1.0-alpha.7
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    a05184d View commit details
    Browse the repository at this point in the history
  46. Update deploy script

    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    31884cd View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    b2a0ed6 View commit details
    Browse the repository at this point in the history
  48. Publish

     - apollo-server-micro@2.1.0-alpha.7
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    e2362db View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    32d993f View commit details
    Browse the repository at this point in the history
  50. Publish

     - apollo-server-core@2.1.0-alpha.8
     - apollo-server-express@2.1.0-alpha.8
     - apollo-server-hapi@2.1.0-alpha.8
     - apollo-server-koa@2.1.0-alpha.8
     - apollo-server-micro@2.1.0-alpha.8
     - apollo-server@2.1.0-alpha.8
    clarencenpy committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    ae21050 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2018

  1. Update spec

    clarencenpy committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    3297e21 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2018

  1. Set strict mode to true

    clarencenpy committed Aug 3, 2018
    Configuration menu
    Copy the full SHA
    0250b30 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2018

  1. Add code comments

    clarencenpy committed Aug 6, 2018
    Configuration menu
    Copy the full SHA
    f95fae6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    01bf9ae View commit details
    Browse the repository at this point in the history
  3. Publish

     - apollo-server-core@2.1.0-alpha.9
     - apollo-server-express@2.1.0-alpha.9
     - apollo-server-hapi@2.1.0-alpha.9
     - apollo-server-koa@2.1.0-alpha.9
     - apollo-server-micro@2.1.0-alpha.9
     - apollo-server@2.1.0-alpha.9
    clarencenpy committed Aug 6, 2018
    Configuration menu
    Copy the full SHA
    368e3af View commit details
    Browse the repository at this point in the history
  4. Merge branch 'master' into defer-support

    # Conflicts:
    #	packages/apollo-server-core/package.json
    #	packages/apollo-server-core/src/__tests__/runQuery.test.ts
    #	packages/apollo-server-core/tsconfig.json
    #	packages/apollo-server-hapi/src/hapiApollo.ts
    clarencenpy committed Aug 6, 2018
    Configuration menu
    Copy the full SHA
    4275fce View commit details
    Browse the repository at this point in the history
  5. Update CHANGELOG

    clarencenpy committed Aug 6, 2018
    Configuration menu
    Copy the full SHA
    c444c45 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2018

  1. Configuration menu
    Copy the full SHA
    e556111 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8a16e44 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0fc3d2a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dd1ff85 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2018

  1. Configuration menu
    Copy the full SHA
    1fa4105 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    927ca65 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2018

  1. Publish

     - apollo-server-core@2.1.0-alpha.10
     - apollo-server-express@2.1.0-alpha.10
     - apollo-server-hapi@2.1.0-alpha.10
     - apollo-server-koa@2.1.0-alpha.10
     - apollo-server-micro@2.1.0-alpha.10
     - apollo-server@2.1.0-alpha.10
    clarencenpy committed Aug 9, 2018
    Configuration menu
    Copy the full SHA
    7e28c89 View commit details
    Browse the repository at this point in the history