https://github.com/bod/helix-express-defer-test
https://github.com/bod/helix-express-defer-test
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bod/helix-express-defer-test
- Owner: BoD
- Created: 2022-04-13T21:16:17.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-13T21:19:38.000Z (about 4 years ago)
- Last Synced: 2025-02-28T21:44:54.974Z (over 1 year ago)
- Language: TypeScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# helix-express-defer-test
```
$ npm install
$ npm start
$ curl 'http://localhost:4000/graphql' -H 'Content-Type: application/json' --data-binary '{"query":"query WithInlineFragmentsQuery { computers { id ...on Computer @defer { cpu year screen { resolution ...on Screen @defer(label: \"b\") { isColor } } } } }"}'
```
```
---
Content-Type: application/json; charset=utf-8
Content-Length: 77
{"data":{"computers":[{"id":"Computer1"},{"id":"Computer2"}]},"hasNext":true}
---
Content-Type: application/json; charset=utf-8
Content-Length: 84
{"data":{"isColor":null},"path":["computers",0,"screen"],"hasNext":true,"label":"b"}
---
Content-Type: application/json; charset=utf-8
Content-Length: 106
{"data":{"cpu":"386","year":1993,"screen":{"resolution":"640x480"}},"path":["computers",0],"hasNext":true}
---
Content-Type: application/json; charset=utf-8
Content-Length: 84
{"data":{"isColor":null},"path":["computers",1,"screen"],"hasNext":true,"label":"b"}
---
Content-Type: application/json; charset=utf-8
Content-Length: 107
{"data":{"cpu":"486","year":1996,"screen":{"resolution":"800x600"}},"path":["computers",1],"hasNext":false}
-----
```