Skip to content

How to query by argument? #16

Closed
Closed
@steinsag

Description

@steinsag

I was wondering if querying a schema via specific arguments is supposed to work out of the box or if anything special must be done to make it work?

In case of the flask example, I was expecting the following to be a valid query:

{
    role(roleId: 2) {
        roleId
        name
    }
}

But I only get

Unknown argument "roleId" on field "role" of type "Query".

So how would I need to extend the example so that I could search employees by their name or retrieve a role via the ID? Or is my query just wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions