https://github.com/up9cloud/graphql-tools-type-uuid
https://github.com/up9cloud/graphql-tools-type-uuid
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/up9cloud/graphql-tools-type-uuid
- Owner: up9cloud
- Created: 2018-01-26T15:20:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-08-02T11:17:52.000Z (almost 5 years ago)
- Last Synced: 2025-10-27T20:30:35.795Z (8 months ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# graphql-tools-type-uuid
[](https://travis-ci.org/up9cloud/graphql-tools-type-uuid)
[](https://coveralls.io/github/up9cloud/graphql-tools-type-uuid?branch=master)
UUID scalar type for [graphql-tools](https://github.com/apollographql/graphql-tools)
## Usage
```js
import { makeExecutableSchema } from 'graphql-tools'
import UUID from 'graphql-tools-type-uuid'
let typeDefs = [`
scalar UUID
type Query {
value(uuid: UUID): UUID
}`
]
let resolvers = {
UUID,
Query: {
value: (root, { uuid }) => uuid
}
}
let schema = makeExecutableSchema({ typeDefs, resolvers })
export default schema
```
## Minimum amount of module files
```console
$ tree ./node_modules/graphql-tools-type-uuid
./node_modules/graphql-tools-type-uuid
├── README.md
├── dist
│ └── index.js
└── package.json
1 directory, 3 files
```