You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to #1230 & #1231, Arrays of GraphQL::ExecutionErrors are valid returns.
Although this could be done in GraphQL::Schema::Objects, it doesn't work on GraphQL::Schema::RelayClassicMutations.
The query example returns the error above as expected.
The mutation example, in contrast returns an error like this:
{
"error": "Unexpected token T in JSON at position 0"
}
Rails console log:
Started POST "/graphql" for 127.0.0.1 at 2018-06-15 12:06:47 +0900
Processing by GraphqlController#execute as */*
Parameters: {"operationName"=>"testMutation", "variables"=>{}, "query"=>"mutation testMutation {\n addFoo(input:{}) {\n foo\n }\n}\n", "graphql"=>{"operationName"=>"testMutation", "variables"=>{"input"=>{"lessonId"=>4000}}, "query"=>"mutation testMutation {\n addFoo(input: {}) {\n foo\n }\n}\n"}}
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)
TypeError (no implicit conversion of Symbol into Integer):
app/controllers/graphql_controller.rb:10:in `execute'
Thanks to #1230 & #1231, Arrays of
GraphQL::ExecutionError
s are valid returns.Although this could be done in
GraphQL::Schema::Object
s, it doesn't work onGraphQL::Schema::RelayClassicMutation
s.examples
https://github.com/ndac-todoroki/graphql-ruby-test
do
rails server
and post queries to /graphqlwhat is expected
Both returns errors like
what happens
The query example returns the error above as expected.
The mutation example, in contrast returns an error like this:
Rails console log:
environment
The text was updated successfully, but these errors were encountered: