Skip to content

How to pass arguments from one field to the next #29

@sgrove

Description

@sgrove

This is related to #28, trying to have an argument for a field that allows explicit depth, e.g.

item(id: 1) { 
  comments(depth: 10) {
    text
    id
    comments
  }
}

Assuming comment is an io_field,

  1. How do I provide a default value for depth? ~default:(Some 1) causes a type error I can't quite get around
  2. Each time before recursing into comments, I want to check if depth is positive, and if so recurse into comments while decrementing the depth argument.

Would you mind providing an example?

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