graphql-elixir / plug_graphql

Plug (Phoenix) integration for GraphQL Elixir
Other
126 stars 7 forks source link

Test Schema is broken in example #19

Closed sircharleswatson closed 8 years ago

sircharleswatson commented 8 years ago

In step 1 of the usage example, the Test Schema is lacking the args property in order for the name to work with the first greeting function.

it should be

  def schema do
    %GraphQL.Schema{
      query: %GraphQL.Type.ObjectType{
        name: "Hello",
        fields: %{
          greeting: %{
            type: %GraphQL.Type.String{},
            args: %{
              name: %{
                type: %GraphQL.Type.String{}
              }
            },
            resolve: {TestSchema, :greeting}
          }
        }
      }
    }
  end
joshprice commented 8 years ago

Closed by #20