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

Introduce requireRootResolvers in GraphQL Modules preset #6796

Merged
merged 4 commits into from Aug 4, 2022

Conversation

kamilkisiela
Copy link
Collaborator

@kamilkisiela kamilkisiela commented Oct 6, 2021

type Query {
  hi(msg: String): Message!
}

type Message {
  body: String!
}

Before (and current default)

import { MyModule } from './generated';
export const resolvers: MyModule.Resolvers = {}; // <-- totally fine

With requireRootResolvers enabled:

import { MyModule } from './generated';
export const resolvers: MyModule.Resolvers = {}; // <-- Oopsie, `Query` and `Query.hi` are missing

It could help people to make sure all resolvers are defined (I think we enforce root-level resolvers in GraphQL Modules library as part of runtime check)

@vercel
Copy link

vercel bot commented Oct 6, 2021

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/theguild/graphql-code-generator/AKrKYPygw7A6vjtxcwsZAekqD9pU
✅ Preview: Failed

[Deployment for 1884baa failed]

@changeset-bot
Copy link

changeset-bot bot commented Oct 6, 2021

🦋 Changeset detected

Latest commit: 8f6ed82

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

This PR includes changesets to release 1 package
Name Type
@graphql-codegen/graphql-modules-preset Minor

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

@theguild-bot
Copy link
Collaborator

theguild-bot commented Oct 6, 2021

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

@graphql-codegen/graphql-modules-preset@2.2.0-alpha-dc0d1ac1d.0

@vercel
Copy link

vercel bot commented Aug 4, 2022

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

Name Status Preview Updated
graphql-code-generator ✅ Ready (Inspect) Visit Preview Aug 4, 2022 at 1:20PM (UTC)

@charlypoly charlypoly self-requested a review August 4, 2022 12:51
@theguild-bot
Copy link
Collaborator

theguild-bot commented Aug 4, 2022

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

@graphql-codegen/graphql-modules-preset@2.5.0-alpha-3d3add7bf.0

@charlypoly charlypoly merged commit 8b6e8e6 into master Aug 4, 2022
@charlypoly charlypoly deleted the kamil-require-root branch August 4, 2022 13:07
@charlypoly
Copy link
Contributor

/theguild blog

@the-guild-content-bot
Copy link

@charlypoly, issue saved for the blog! ⚡️

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.

None yet

3 participants