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

Input Types cannot define resolvers #28

Closed
michaellee8 opened this issue Sep 4, 2017 · 4 comments
Closed

Input Types cannot define resolvers #28

michaellee8 opened this issue Sep 4, 2017 · 4 comments
Assignees

Comments

@michaellee8
Copy link

When I am using this library in latest graphql, I can see the below error

CreateusersValuesInput.userId field type has a resolve property, but Input Types cannot define resolvers.
at invariant (/home/michael/revisioner-graphql/node_modules/graphql/jsutils/invariant.js:19:11)

but this problem can be eliminated (with possible problems) by falling back to graphql@^0.8.0
I believe this is due to a breaking API change, how do you guys think of it

@Glavin001 Glavin001 added the bug label Oct 14, 2017
@Glavin001
Copy link
Owner

Please provide some code to reproduce this error.

@Glavin001
Copy link
Owner

I am also experiencing this now with:

    "graphql": "^0.11.7",

Here are my logs:

Unhandled rejection Error: createUserInput.id field type has a resolve property, but Input Types cannot define resolvers.
    at invariant (/Users/glavin/Development/HealthForms/packages/api/node_modules/graphql/jsutils/invariant.js:18:11)
    at /Users/glavin/Development/HealthForms/packages/api/node_modules/graphql/type/definition.js:698:58
    at Array.forEach (native)
    at GraphQLInputObjectType._defineFieldMap (/Users/glavin/Development/HealthForms/packages/api/node_modules/graphql/type/definition.js:692:16)
    at GraphQLInputObjectType.getFields (/Users/glavin/Development/HealthForms/packages/api/node_modules/graphql/type/definition.js:681:49)
    at typeMapReducer (/Users/glavin/Development/HealthForms/packages/api/node_modules/graphql/type/schema.js:223:26)
    at typeMapReducer (/Users/glavin/Development/HealthForms/packages/api/node_modules/graphql/type/schema.js:189:12)
    at Array.reduce (native)
    at /Users/glavin/Development/HealthForms/packages/api/node_modules/graphql/type/schema.js:216:36
    at Array.forEach (native)
    at typeMapReducer (/Users/glavin/Development/HealthForms/packages/api/node_modules/graphql/type/schema.js:209:27)
    at Array.reduce (native)
    at new GraphQLSchema (/Users/glavin/Development/HealthForms/packages/api/node_modules/graphql/type/schema.js:97:34)
    at Object.getSchema (/Users/glavin/Development/HealthForms/packages/api/node_modules/graphql-sequelize-crud/lib/index.js:887:10)
    at /Users/glavin/Development/HealthForms/packages/api/dist/index.js:116:43
    at tryCatcher (/Users/glavin/Development/HealthForms/packages/api/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/glavin/Development/HealthForms/packages/api/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/glavin/Development/HealthForms/packages/api/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/glavin/Development/HealthForms/packages/api/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/glavin/Development/HealthForms/packages/api/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/Users/glavin/Development/HealthForms/packages/api/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/Users/glavin/Development/HealthForms/packages/api/node_modules/bluebird/js/release/async.js:143:10)

@Glavin001 Glavin001 assigned Glavin001 and unassigned michaellee8 Oct 15, 2017
@Glavin001 Glavin001 changed the title Mutations cannot define resolvers Input Types cannot define resolvers Oct 15, 2017
@Glavin001
Copy link
Owner

Duplicate of #19

@Glavin001 Glavin001 marked this as a duplicate of #19 Oct 15, 2017
@Glavin001
Copy link
Owner

Glavin001 commented Oct 16, 2017

Published a big new release, v0.4.1! https://github.com/Glavin001/graphql-sequelize-crud/releases/tag/v0.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants