markdown GraphQL查询

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown GraphQL查询相关的知识,希望对你有一定的参考价值。

[official ref](https://www.apollographql.com/docs/react/essentials/queries.html)

# Query with Input

```js
const PERSONS_QUERY = gql`
{
  persons(
    storeInfo: {
      alias: "testStore"
    }
  ){
    id
    name
    #...
}
`
```
this works same as we do in PlayGround
but if I want to use programmatic `parameter`

```js
const PERSONS_QUERY = gql`
\!h query PersonsByStore($storeAlias: String!){
  persons(
    storeInfo: {
\!h       alias: $storeAlias
    }
  ){
    id
    name
    #...
  }
}
```

以上是关于markdown GraphQL查询的主要内容,如果未能解决你的问题,请参考以下文章