uesteibar / neuron

A GraphQL client for Elixir
https://hex.pm/packages/neuron
Other
331 stars 35 forks source link

InputTypes #62

Closed JamesArthurHolland closed 4 years ago

JamesArthurHolland commented 4 years ago

Hi, does neuron support input types?

If so, could you please explain it in documentation?

Thanks,

Jamie

uesteibar commented 4 years ago

Hi! What do you mean by input type? As far as I know there's nothing stopping you from doing something like

Neuron.query("""
      mutation createUser($input: UserCreationInput!) {
        createUser(input: $input) {
          id
          name
        }
      }
  """,
  %{
    input: %{
      name: "my-name",
      age: 25
    }
  }
)

If something like that doesn't work then it's a bug and we should fix it.

Is that what you're looking for?

JamesArthurHolland commented 4 years ago

Yea that's great. It works. Thanks