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

feat: APQ between subgraph and gateway #313

Merged
merged 5 commits into from
Dec 12, 2024
Merged

feat: APQ between subgraph and gateway #313

merged 5 commits into from
Dec 12, 2024

Conversation

ardatan
Copy link
Member

@ardatan ardatan commented Dec 12, 2024

Closes #272

Automatic Persisted Queries support for upstream requests

For HTTP Executor;

buildHTTPExecutor({
    // ...
    apq: true,
})

For Gateway Configuration;

export const gatewayConfig = defineConfig({
    transportEntries: {
        '*': {
            options: {
                apq: true
            }
        }
    },
})

@theguild-bot
Copy link
Collaborator

theguild-bot commented Dec 12, 2024

🚀 Snapshot Release (alpha)

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

Package Version Info
@graphql-tools/executor-http 1.2.0-alpha-52e7c9192bd3022251be5c3cabe546398300b30d npm ↗︎ unpkg ↗︎
@graphql-tools/federation 3.0.1-alpha-52e7c9192bd3022251be5c3cabe546398300b30d npm ↗︎ unpkg ↗︎
@graphql-mesh/fusion-runtime 0.10.20-alpha-52e7c9192bd3022251be5c3cabe546398300b30d npm ↗︎ unpkg ↗︎
@graphql-hive/gateway 1.6.8-alpha-52e7c9192bd3022251be5c3cabe546398300b30d npm ↗︎ unpkg ↗︎
@graphql-mesh/plugin-opentelemetry 1.3.27-alpha-52e7c9192bd3022251be5c3cabe546398300b30d npm ↗︎ unpkg ↗︎
@graphql-mesh/plugin-prometheus 1.3.15-alpha-52e7c9192bd3022251be5c3cabe546398300b30d npm ↗︎ unpkg ↗︎
@graphql-hive/gateway-runtime 1.3.15-alpha-52e7c9192bd3022251be5c3cabe546398300b30d npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-http 0.6.26-alpha-52e7c9192bd3022251be5c3cabe546398300b30d npm ↗︎ unpkg ↗︎

@theguild-bot
Copy link
Collaborator

theguild-bot commented Dec 12, 2024

🚀 Snapshot Release (Binary for Linux-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Collaborator

theguild-bot commented Dec 12, 2024

🚀 Snapshot Release (Binary for macOS-ARM64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Collaborator

theguild-bot commented Dec 12, 2024

🚀 Snapshot Release (Bun Docker Image)

The latest changes of this PR are available as image on GitHub Container Registry (based on the declared changesets):

ghcr.io/graphql-hive/gateway:1.6.8-alpha-52e7c9192bd3022251be5c3cabe546398300b30d-bun

@theguild-bot
Copy link
Collaborator

theguild-bot commented Dec 12, 2024

🚀 Snapshot Release (Node Docker Image)

The latest changes of this PR are available as image on GitHub Container Registry (based on the declared changesets):

ghcr.io/graphql-hive/gateway:1.6.8-alpha-52e7c9192bd3022251be5c3cabe546398300b30d

@theguild-bot
Copy link
Collaborator

theguild-bot commented Dec 12, 2024

🚀 Snapshot Release (Binary for macOS-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Collaborator

theguild-bot commented Dec 12, 2024

🚀 Snapshot Release (Binary for Windows-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@ardatan ardatan force-pushed the apq-upstream branch 2 times, most recently from 86e733f to 9338e8c Compare December 12, 2024 02:38
transportEntries: {
greetings: {
options: {
apq: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Transport entries is marked as an advanced feature today. Do we want to hide this behind this setting ?

Perhaps we can have a top level option instead ?

Copy link
Member Author

@ardatan ardatan Dec 12, 2024

Choose a reason for hiding this comment

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

They are not advanced. It is a way to configure the transport.
I don't think a top level option is a good idea because this feature is specific to HTTP transport.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think it's advanced, but that's what we are advertising in the documentation ^^'

And the way transport entries work is never actually explain. It's shortly explained in the Subscriptions page because it is needed to configure websocket/http callback subscription transports

Copy link
Member Author

Choose a reason for hiding this comment

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

We should fix it then yes. I agree it is a bit low level but i think we should cover each feature individial rather than grouping them into one single transportEntries documentation. What do you think?

@ardatan ardatan merged commit 367b359 into main Dec 12, 2024
36 checks passed
@ardatan ardatan deleted the apq-upstream branch December 12, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] APQ between GW and subgraphs
3 participants