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

[graphiql/toolkit] support graphql-sse #3750

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

[graphiql/toolkit] support graphql-sse #3750

wants to merge 13 commits into from

Conversation

dimaMachina
Copy link
Collaborator

No description provided.

Copy link

changeset-bot bot commented Aug 24, 2024

🦋 Changeset detected

Latest commit: 2936a79

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@graphiql/toolkit Minor
@graphiql/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Aug 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 43 lines in your changes missing coverage. Please review.

Project coverage is 64.93%. Comparing base (a929862) to head (2936a79).

Files Patch % Lines
...l-toolkit/src/create-fetcher/create-sse-fetcher.ts 0.00% 37 Missing ⚠️
...aphiql-toolkit/src/create-fetcher/createFetcher.ts 0.00% 5 Missing ⚠️
packages/graphiql/test/schema.js 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3750      +/-   ##
==========================================
- Coverage   65.32%   64.93%   -0.39%     
==========================================
  Files         122      123       +1     
  Lines        7003     7045      +42     
  Branches     2260     2252       -8     
==========================================
  Hits         4575     4575              
- Misses       2411     2453      +42     
  Partials       17       17              
Files Coverage Δ
packages/graphiql/test/schema.js 38.57% <0.00%> (ø)
...aphiql-toolkit/src/create-fetcher/createFetcher.ts 0.00% <0.00%> (ø)
...l-toolkit/src/create-fetcher/create-sse-fetcher.ts 0.00% <0.00%> (ø)

Copy link
Contributor

github-actions bot commented Aug 24, 2024

The latest changes of this PR are available as canary in npm (based on the declared changesets):

graphiql@3.7.2-canary-8704d28b.0
@graphiql/plugin-code-exporter@3.1.3-canary-8704d28b.0
@graphiql/plugin-explorer@3.2.3-canary-8704d28b.0
@graphiql/react@0.26.3-canary-8704d28b.0
@graphiql/toolkit@0.12.0-canary-8704d28b.0

@acao acao added this to the graphiql@4.0.0 milestone Aug 30, 2024
const sseClient = createClient({
retryAttempts: 0,
// @ts-expect-error
singleConnection: true, // or use false if you have an HTTP/2 server
Copy link

@derekwilling derekwilling Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this supposed to be configured by the user? Does it not support distinct connections mode?

I'm having issues getting the client to send POST requests (distinct connections mode) instead of PUT requests (single connection mode).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, we need to pass options in

const sseFetcher = await createSseFetcher({
url: options.subscriptionUrl,
});

@acao
Copy link
Member

acao commented Sep 11, 2024

@dimaMachina can you update the docs in toolkit as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants