Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lewis-wow/gql-ts-op
https://github.com/lewis-wow/gql-ts-op
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/lewis-wow/gql-ts-op
- Owner: lewis-wow
- License: mit
- Created: 2024-08-12T21:00:46.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-08-18T20:40:43.000Z (4 months ago)
- Last Synced: 2024-08-19T14:46:00.480Z (4 months ago)
- Language: TypeScript
- Size: 272 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GQL TS OP
```ts
const myQuery = build((args: { my_id: string }) => ({
query: {
tweet: {
__args: {
id: args.my_id,
},
date: true,
body: as('my_body'),
author: as('my_author', {
name: true,
id: false,
}),
},
},
}));
``````json
{
"query": {
"tweet": {
"__args": { "id": { "__variableName": "my_id" } },
"date": true,
"body": { "__as": "my_body", "value": true },
"author": { "__as": "my_author", "value": { "name": true, "id": false } }
}
}
}
``````graphql
query ($my_id: ID!) {
tweet(id: $my_id) {
date
my_body: body
my_author: author {
name
}
}
}
```