graphql demo: create mutations require arguments not provided by forms
What you were expecting: The demo should allow the user to create a customer.
What happened instead:
GraphQL error: Field "createCustomer" argument "avatar" of type "String!" is required but not provided.
GraphQL error: Field "createCustomer" argument "first_seen" of type "Date!" is required but not provided.
GraphQL error: Field "createCustomer" argument "last_seen" of type "Date!" is required but not provided.
GraphQL error: Field "createCustomer" argument "has_ordered" of type "Boolean!" is required but not provided.
GraphQL error: Field "createCustomer" argument "has_newsletter" of type "Boolean!" is required but not provided.
GraphQL error: Field "createCustomer" argument "groups" of type "[String]!" is required but not provided.
GraphQL error: Field "createCustomer" argument "nb_commands" of type "Int!" is required but not provided.
GraphQL error: Field "createCustomer" argument "total_spent" of type "Float!" is required but not provided.
Steps to reproduce:
yarn run-graphql-demo
Create a customer
Related code:
createCustomer(
id: ID!
first_name: String!
last_name: String!
email: String!
address: String
zipcode: String
city: String
avatar: String!
birthday: Date
first_seen: Date!
last_seen: Date!
has_ordered: Boolean!
latest_purchase: Date
has_newsletter: Boolean!
groups: [String]!
nb_commands: Int!
total_spent: Float!
): Customer
Submitting the form fills:
variables: {
first_name: "x"
last_name: "x"
email: "[email protected]"
address: "x"
zipcode: "x"
city: "x"
birthday: "2020-03-01"
password: "123"
confirm_password: "123"
}
Other information: Not really clear to me what should be changed and where. Is this a json-graphql-server issue?
Environment
- React-admin version: commit 594b6a17
- Last version that did not exhibit the issue (if applicable):-
- React version: -
- Browser: -
- Stack trace (in case of a JS error):
at new ApolloError (ApolloError.ts:46)
at Object.next (QueryManager.ts:225)
at notifySubscription (Observable.js:135)
at onNotify (Observable.js:179)
at SubscriptionObserver.next (Observable.js:235)
at observables.ts:12
at Set.forEach (<anonymous>)
at Object.next (observables.ts:12)
at notifySubscription (Observable.js:135)
at onNotify (Observable.js:179)
at SubscriptionObserver.next (Observable.js:235)
at httpLink.ts:142
Reproduced Thanks for your issue flagged as bug
As you pointed, it's a json-graphql-server issue :(
With the release of react-admin v5, react-admin v3 has reached its end of life. We won't fix bugs or make any new release on the 3.x branch. We recommend that you switch to a more recent version of react-admin.
So I'm closing this issue as we won't fix it.