Skip to content

Nested fields input arguments are ignored #61

Closed
@pie6k

Description

@pie6k

My schema allows login like:

mutation {
  auth {
    login(input: { email: "aaa", password: "aaa" }) {
      token
    }
  }
}

However, generated binding is ignoring input argument for login field. It is only allowing arguments on root mutation and query field and that is pretty much making it useless for my use-case.

My config:

{
  "projects":{
    "XYZ":{
      "schemaPath":"src/schema/api.graphql",
      "extensions":{
        "endpoints": {
          "dev":"http://localhost:9000/api/"
        },
        "prepare-binding": {
          "output": "src/schema/api.ts",
          "generator": "binding-ts"
        }
      }
    }
  }
}

I'd like to use binding like

binding.mutation.auth.login(inputDataHere)

or as async

const auth = await binding.mutation.auth();
auth.login(inputDataHere)`;

// or even (await binding.mutation.auth()).login(data)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions