We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Lets say I have a mutation like this
mutation {createPost( title: 'Copa America', description: ' Latest results ', authors: [ {name: 'Maradona', email: 'maradona@gmail.com' } , {name: 'Messi', email: 'messi@gmail.com' } ] )}
How Do I handle this scenario? -
I tried the author ListType( new AuthorType()) ?
ListType is not iterating each AuthorType sent on the request so its failing with Not valid Type....
Not valid Type....
ResolveValidator line
if (!$argumentType->isValidValue($argumentType->parseValue($argument->getValue()->getValue()))) {
Is receiving the entire array sent and not a single iteration..
I guess we need a InputListType ? or I am missing something
The text was updated successfully, but these errors were encountered:
Ok, so the thing here is that your AuthorType should also be an InputType e.g. extended from AbstractInputObjectType. Details in Gitter :)
Sorry, something went wrong.
And example for future references.
$config->getMutation()->addFields([ 'createProperty' => [ 'type' => new PropertyType(), 'args' => [ 'title' => new StringType(), 'tenants' => new ListType(new InputTenantType()), ], 'resolve' => function($value, $args, $info) { // do your insert return []; } ] ]);
No branches or pull requests
Lets say I have a mutation like this
How Do I handle this scenario? -
I tried the author ListType( new AuthorType()) ?
ListType is not iterating each AuthorType sent on the request so its failing with
Not valid Type....
ResolveValidator line
Is receiving the entire array sent and not a single iteration..
I guess we need a InputListType ? or I am missing something
The text was updated successfully, but these errors were encountered: