Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ defmodule PlugGraphql.Mixfile do
{:cowboy, "~> 1.0"},
{:plug, "~> 0.14 or ~> 1.0"},
{:poison, "~> 1.5"},
{:graphql, "~> 0.0.4"}]
{:graphql, "0.0.6"}]
end

defp package do
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cowlib": {:hex, :cowlib, "1.0.2"},
"earmark": {:hex, :earmark, "0.1.19"},
"ex_doc": {:hex, :ex_doc, "0.11.0"},
"graphql": {:hex, :graphql, "0.0.4"},
"graphql": {:hex, :graphql, "0.0.6"},
"plug": {:hex, :plug, "1.0.2"},
"poison": {:hex, :poison, "1.5.0"},
"ranch": {:hex, :ranch, "1.2.0"}}
13 changes: 6 additions & 7 deletions test/graphql/plug/endpoint_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@ defmodule GraphQL.Plug.EndpointTest do
%GraphQL.Schema{
query: %GraphQL.ObjectType{
name: "RootQueryType",
fields: [
%GraphQL.FieldDefinition{
name: "greeting",
fields: %{
greeting: %GraphQL.FieldDefinition{
type: "String",
resolve: &TestSchema.greeting/1,
resolve: &TestSchema.greeting/3,
}
]
}
}
}
end

def greeting(name: name), do: "Hello, #{name}!"
def greeting(_), do: greeting(name: "world")
def greeting(_, %{name: name}, _), do: "Hello, #{name}!"
def greeting(_, _, _), do: greeting(%{}, %{name: "world"}, %{})
end

# Setup a Plug which calls the Plug under test
Expand Down