Skip to content

Add config.graphql.apolloConfig - #4912

Merged
timleslie merged 1 commit into
masterfrom
apollo-server-config
Mar 16, 2021
Merged

timleslie merged 1 commit into
masterfrom
apollo-server-config

Conversation

@timleslie

@timleslie timleslie commented Feb 21, 2021 •

Copy link
Copy Markdown
Contributor

This PR adds a config option which allows the user to specify additional config to be applied to their ApolloServer. This is required for customising things like query limiting and the GraphQL playground, among other things.

See the ApolloServer constructor docs here: https://www.apollographql.com/docs/apollo-server/api/apollo-server/#constructor

This PR is a blocker for #4894.

@vercel

vercel Bot commented Feb 21, 2021 •

Copy link
Copy Markdown

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/2WAywK6kPPMAUFYTE2KggG8wcL4D
✅ Preview: https://keystone-next-docs-git-apollo-server-config-keystonejs.vercel.app

@changeset-bot

changeset-bot Bot commented Feb 21, 2021 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f23d3e4

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

This PR includes changesets to release 11 packages
Name Type
@keystone-next/website Minor
@keystone-next/keystone Minor
@keystone-next/types Minor
@keystone-next/test-utils-legacy Patch
@keystone-next/auth Major
@keystone-next/example-auth Patch
@keystone-next/app-basic Patch
@keystone-next/example-ecommerce Patch
keystone-next-app Patch
@keystone-next/example-roles Patch
@keystone-next/example-todo 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

@timleslie
timleslie force-pushed the apollo-server-config branch from 8a598c7 to b920b3d Compare February 21, 2021 23:08
@vercel
vercel Bot temporarily deployed to Preview February 21, 2021 23:10 Inactive
@timleslie
timleslie enabled auto-merge (squash) February 21, 2021 23:13
@timleslie timleslie changed the title Add config.graphql.apolloConfig [WIP] Add config.graphql.apolloConfig Feb 21, 2021
@JedWatson

JedWatson commented Feb 21, 2021 •

Copy link
Copy Markdown
Member

When it comes to adding/modifying config I'd really like to have a process where we document the longer-term view of what all the things are we're planning to solve with config, and then review PRs like this with that in mind.

I find it hard to see where this is going, and what else it may interact with down the future, which makes breaking changes more likely in my mind.

We had this early on with the types, and it was really helpful, but we've cleaned them up now to match what's actually been implemented. Which is good, but we've lost that future clarity, and imo should figure out how to get it back.

@vercel
vercel Bot temporarily deployed to Preview February 22, 2021 04:19 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 145c9f5 to 2ba2d69 Compare February 24, 2021 05:07
@vercel
vercel Bot temporarily deployed to Preview February 24, 2021 05:07 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 2ba2d69 to 8cd47d7 Compare February 25, 2021 03:03
@vercel
vercel Bot temporarily deployed to Preview February 25, 2021 03:03 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 8cd47d7 to 445d705 Compare March 1, 2021 22:34
@vercel
vercel Bot temporarily deployed to Preview March 1, 2021 22:34 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 445d705 to ede9a9e Compare March 2, 2021 02:29
@vercel
vercel Bot temporarily deployed to Preview March 2, 2021 02:29 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from ede9a9e to d2da46a Compare March 5, 2021 04:50
@vercel
vercel Bot temporarily deployed to Preview March 5, 2021 04:50 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from d2da46a to 832a2a8 Compare March 8, 2021 21:49
@vercel
vercel Bot temporarily deployed to Preview March 8, 2021 21:49 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 832a2a8 to 6a572da Compare March 9, 2021 21:51
@vercel
vercel Bot temporarily deployed to Preview March 9, 2021 21:51 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 6a572da to 2096b1e Compare March 9, 2021 23:05
@vercel
vercel Bot temporarily deployed to Preview March 9, 2021 23:05 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 2096b1e to 369beb4 Compare March 9, 2021 23:19
@timleslie
timleslie force-pushed the apollo-server-config branch from af5f30c to 422bd44 Compare March 10, 2021 22:48
@vercel
vercel Bot temporarily deployed to Preview March 10, 2021 22:48 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 422bd44 to f0695fa Compare March 11, 2021 04:58
@vercel
vercel Bot temporarily deployed to Preview March 11, 2021 04:58 Inactive
@timleslie timleslie changed the title [WIP] Add config.graphql.apolloConfig Add config.graphql.apolloConfig Mar 11, 2021
@timleslie
timleslie requested a review from JedWatson March 11, 2021 22:40
@timleslie
timleslie force-pushed the apollo-server-config branch from f0695fa to 3fe7462 Compare March 11, 2021 23:55
@vercel
vercel Bot temporarily deployed to Preview March 11, 2021 23:55 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 3fe7462 to 67e2e99 Compare March 12, 2021 02:37
@vercel
vercel Bot temporarily deployed to Preview March 12, 2021 02:37 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 67e2e99 to 8d92ef0 Compare March 12, 2021 03:18
@vercel
vercel Bot temporarily deployed to Preview March 12, 2021 03:18 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 8d92ef0 to a9711aa Compare March 12, 2021 03:43
@vercel
vercel Bot temporarily deployed to Preview March 12, 2021 03:44 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from a9711aa to 31ea0ce Compare March 15, 2021 00:21
@vercel
vercel Bot temporarily deployed to Preview March 15, 2021 00:21 Inactive
@vercel
vercel Bot temporarily deployed to Preview March 15, 2021 06:09 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from fc847f1 to 457ebd4 Compare March 15, 2021 06:15
@vercel
vercel Bot temporarily deployed to Preview March 15, 2021 06:15 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 457ebd4 to 193ec37 Compare March 15, 2021 22:47
@vercel
vercel Bot temporarily deployed to Preview March 15, 2021 22:47 Inactive
@timleslie
timleslie force-pushed the apollo-server-config branch from 193ec37 to f23d3e4 Compare March 16, 2021 01:42
@vercel
vercel Bot temporarily deployed to Preview March 16, 2021 01:42 Inactive
@timleslie
timleslie merged commit d31acf6 into master Mar 16, 2021
@timleslie
timleslie deleted the apollo-server-config branch March 16, 2021 03:00
graphQLSchema,
createContext,
sessionStrategy: initializedKeystoneConfig.session ? initializedKeystoneConfig.session() : undefined,
apolloConfig: config.graphql?.apolloConfig,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
apolloConfig: config.graphql?.apolloConfig,
apolloConfig: initializedKeystoneConfig.graphql?.apolloConfig,

This branch was previously deployed

3 inactive (2 outdated) deployments
Preview — f23d3e4a Deployed Mar 16, 2021 by vercel[bot]
Preview – keystone-next-docs — af5f30cb Deployed Mar 10, 2021 by vercel[bot]
Preview – keystone-prisma-on-vercel-experimenting — af5f30cb Deployed Mar 10, 2021 by vercel[bot]
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.

3 participants