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

GraphQL subscriptions for stanzas #3830

Merged
merged 17 commits into from
Nov 8, 2022
Merged

Commits on Nov 3, 2022

  1. Verify allowed operations types

    - Subscriptions can be executed only with SSE.
    - Queries and mutations can be executed with HTTP or CLI.
    chrzaszcz committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    4762e34 View commit details
    Browse the repository at this point in the history
  2. Add 'prepare' step to query execution, and verify operations

    This makes it possible to the execute a prepared subscription operation
    upon receiving each event.
    Also: make it possible to return 'aux' data.
    chrzaszcz committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    503a500 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2022

  1. Extract common SSE helpers

    chrzaszcz committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    be937bb View commit details
    Browse the repository at this point in the history
  2. Add the GraphQL SSE handler

    It uses lasse, just like the REST SSE handler
    chrzaszcz committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    27ae003 View commit details
    Browse the repository at this point in the history
  3. Update the GraphQL cowboy handler

    - Handle SSE requests under the '/sse' subpath
    - Export utils used by the SSE handler
    - Allow passing parameters with GET (qs) or POST (body).
      This follows the GraphQL specs, and allows to handle SSE.
    chrzaszcz committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    16bf4ba View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    faa959c View commit details
    Browse the repository at this point in the history
  5. Handle new GraphQL errors

    - unsupported operation
    - invalid query string
    chrzaszcz committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    05d8bce View commit details
    Browse the repository at this point in the history
  6. Add message subscription handling to mongoose_stanza_api

    This common code is used by REST and GraphQL SSE handlers.
    chrzaszcz committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    94421ec View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    31393bb View commit details
    Browse the repository at this point in the history
  8. Add subscriptions to graphql commands

    This is actually used only for building the queries for tests.
    The commands will be displayed in the CLI help - we can change this
    later if needed.
    chrzaszcz committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    9d2125e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3cda9d8 View commit details
    Browse the repository at this point in the history
  10. Add subscription resolvers

    chrzaszcz committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    e77cf58 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    28ff10a View commit details
    Browse the repository at this point in the history
  12. Test the SSE subscription handler

    Put the more generic tests (mostly error handling) in a separate suite.
    chrzaszcz committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    4c3dcd9 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    856b379 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    82ce031 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

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