graphql-elixir / graphql

GraphQL Elixir
Other
859 stars 47 forks source link

Specifying an invalid operation name should return a friendly error message #92

Closed aweiker closed 8 years ago

aweiker commented 8 years ago

Currently a nil is passed in causing code to crash.

Unit Test:

  test "returns an error when an operation name does not match an operation defined in the query" do
    {_, result} = execute(TestSchema.schema, "query a {greeting}", operation_name: "b")
    assert_has_error(result, %{message: "Must provide an operation name that exists in the query."})
  end
joshprice commented 8 years ago

Closed by #93