mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-11 10:46:25 +03:00
Docs: refactor snowflake example for NQ
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10596 GitOrigin-RevId: f4e005a4ac73bc4ab1d4704b16d6c36b4a4e2450
This commit is contained in:
parent
63d90dcf69
commit
2ca46b3ce5
@ -247,7 +247,7 @@ generated in the previous API call. All we need to provide is the date range we
|
||||
|
||||
```graphql
|
||||
query {
|
||||
article_with_excerpt(args: { max_length: 20 }, where: { date: { _gte: "2023-03-01" } }) {
|
||||
article_with_excerpt(args: { max_length: 20 }) {
|
||||
id
|
||||
title
|
||||
date
|
||||
@ -497,34 +497,6 @@ use an argument to specify the name of the table in a `FROM` clause.
|
||||
|
||||
When making a query, the arguments are specified using the `args` parameter of the query root field.
|
||||
|
||||
##### Example: `LIKE` operator
|
||||
|
||||
A commonly used operator is the `LIKE`. When used in a `WHERE` condition, it's usually written with this syntax
|
||||
`WHERE Title LIKE '%word%'`.
|
||||
|
||||
In order to use it with Native Query arguments, you need to use this syntax `LIKE ('%' || {{searchTitle}} || '%')`,
|
||||
where `searchTitle` is the Native Query parameter.
|
||||
|
||||
## Using the Native Query
|
||||
|
||||
You can make a GraphQL request using the specified root field name just as you would any other GraphQL query. When
|
||||
making a query, the arguments are specified using the `args` parameter of the query root field.
|
||||
|
||||
```graphql
|
||||
query {
|
||||
<root field name>(
|
||||
[args: {"<argument name>": <argument value>, ...},]
|
||||
[where: ...,]
|
||||
[order_by: ..., distinct_on: ...,]
|
||||
[limit: ..., offset: ...]
|
||||
) {
|
||||
<field 1>
|
||||
<field 2>
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Query functionality
|
||||
|
||||
Just like tables, Native Queries generate GraphQL types with the ability to further break down the data. You can find
|
||||
|
Loading…
Reference in New Issue
Block a user