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

Support body-parser options when configuring GraphQL #7591

Merged
merged 6 commits into from
Jun 8, 2022

Conversation

dcousens
Copy link
Member

@dcousens dcousens commented Jun 2, 2022

Following the discussion in #7582

body-parser has a number of configuration options that may be useful for developers to configure themselves. It looks like Apollo 4 will be changing how express interacts with user code in future so we'll need to do this anyway; might as well do it now.

@vercel
Copy link

vercel bot commented Jun 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
keystone-next-docs ✅ Ready (Inspect) Visit Preview Jun 7, 2022 at 6:35AM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Jun 2, 2022

🦋 Changeset detected

Latest commit: 1d4f41b

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

This PR includes changesets to release 15 packages
Name Type
@keystone-6/core Minor
@keystone-6/auth Major
@keystone-6/cloudinary Major
@keystone-6/fields-document Major
@keystone-6/session-store-redis Major
@keystone-6/example-auth Patch
@keystone-6/examples-app-basic Patch
@keystone-6/example-ecommerce Patch
@keystone-6/example-graphql-api-endpoint Patch
@keystone-6/example-roles Patch
@keystone-6/example-testing Patch
@keystone-6/example-with-auth Patch
@keystone-6/sandbox Patch
@keystone-6/website Patch
@keystone-6/example-document-field 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

@vercel vercel bot temporarily deployed to Preview June 2, 2022 06:27 Inactive
@dcousens dcousens marked this pull request as ready for review June 2, 2022 06:29
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 2, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 1d4f41b:

Sandbox Source
@keystone-6/sandbox Configuration

@@ -48,6 +48,7 @@ const addApolloServer = async ({
app: server,
path: config.graphql?.path || '/api/graphql',
cors: false,
bodyParserConfig: config.graphql?.bodyParser === undefined ? true : config.graphql?.bodyParser,
Copy link
Member

Choose a reason for hiding this comment

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

Is true equivalent to the default? and if so, why doesn't just config.graphql?.bodyParser work?

Copy link
Member Author

Choose a reason for hiding this comment

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

@vercel vercel bot temporarily deployed to Preview June 3, 2022 12:24 Inactive
Copy link
Member

@emmatown emmatown left a comment

Choose a reason for hiding this comment

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

Other than adding a changeset, this looks good to me

@vercel vercel bot temporarily deployed to Preview June 6, 2022 02:50 Inactive
@vercel vercel bot temporarily deployed to Preview June 7, 2022 01:11 Inactive
@vercel vercel bot temporarily deployed to Preview June 7, 2022 02:47 Inactive
@vercel vercel bot temporarily deployed to Preview June 7, 2022 04:03 Inactive
@vercel vercel bot temporarily deployed to Preview June 7, 2022 04:35 Inactive
@vercel vercel bot temporarily deployed to Preview June 7, 2022 05:11 Inactive
@vercel vercel bot temporarily deployed to Preview June 7, 2022 06:35 Inactive
@dcousens dcousens enabled auto-merge (squash) June 8, 2022 00:20
@dcousens dcousens disabled auto-merge June 8, 2022 00:52
@dcousens dcousens enabled auto-merge (squash) June 8, 2022 00:52
@dcousens dcousens merged commit 8add421 into main Jun 8, 2022
@dcousens dcousens deleted the add-body-parser-options branch June 8, 2022 00:58
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