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

Return type check problem of mutationWithClientMutationId after 0.7.0 update #339

Closed
gtolarc opened this issue Jun 17, 2021 · 3 comments · Fixed by #349
Closed

Return type check problem of mutationWithClientMutationId after 0.7.0 update #339

gtolarc opened this issue Jun 17, 2021 · 3 comments · Fixed by #349

Comments

@gtolarc
Copy link

gtolarc commented Jun 17, 2021

After the 0.7.0 update, the following code has a problem.

const testMutation = mutationWithClientMutationId({
  name: 'TEST',
  inputFields: {
    name: { type: new GraphQLNonNull(GraphQLString) },
  },
  outputFields: {
    obj: {
      type, // some type
      resolve: (source, args, context, info) => source,
    },
  },
  mutateAndGetPayload: async (input, context, info) => {
    return new GraphQLError('TEST Error');
  },
}

Perhaps because the type defined in the output is forcibly checked, the error message return that was allowed in the past does not work. Is this the intended situation?

@IvanGoncharov
Copy link
Member

@gtolarc Thanks for reporting 👍
To confirm you get the error during type check and not in runtime, right?
Do you use Flow or Typescript?
Can you please paste the error message here?

@gtolarc
Copy link
Author

gtolarc commented Jun 21, 2021

스크린샷 2021-06-21 오후 12 46 03

I used typescript and this is an error that occurs at runtime.

IvanGoncharov added a commit to IvanGoncharov/graphql-relay-js that referenced this issue Jun 28, 2021
IvanGoncharov added a commit to IvanGoncharov/graphql-relay-js that referenced this issue Jun 28, 2021
@IvanGoncharov
Copy link
Member

@gtolarc Thanks for reporting, fixed in https://github.com/graphql/graphql-relay-js/releases/tag/v0.8.0

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 a pull request may close this issue.

2 participants