Last active
March 3, 2020 15:54
-
-
Save vladbatushkov/c661bf33f080c99f19f07a0964f10cea to your computer and use it in GitHub Desktop.
Example of Query component for GraphQL-to-Neo4j request for Airports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Query | |
query={gql` | |
query airportsPaginateQuery( | |
$first: Int | |
$offset: Int | |
$orderBy: [_AirportOrdering] | |
$filter: _AirportFilter | |
) { | |
Airport( | |
first: $first | |
offset: $offset | |
orderBy: $orderBy | |
filter: $filter | |
) { | |
code | |
name | |
city | |
country | |
location { | |
longitude | |
latitude | |
} | |
} | |
} | |
`} | |
variables={{ | |
first: this.state.rowsPerPage, | |
offset: this.state.rowsPerPage * this.state.page, | |
orderBy: this.state.orderBy + "_" + this.state.order, | |
filter: this.getFilter() | |
}} | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment