Skip to content

how to query for first few records using graphql #129

@santosh9991

Description

@santosh9991

When I add query arguments and try to access first 2 records, it troughs an error
image
Fig1: Models.py
image
Fig2: Schema.py
image
Fig3: Query returning all records with departmentId 2 from employee table

When I try to query for first two records from employee table by passing value to first argument as shown in fig 4: it troughs an error complaining that, it found an unexpected keyword 'first'. However, I see first as default argument to the Employees endpoint(to the right of fig4.). I am new to graphQL. Any help is appreciated. Basically, I want to use pagination after I query for records on certain fields.
image
Fig4: Error message

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