Skip to content

Commit 645b86f

Browse files
authored
Update README.md
1 parent 3c4ec84 commit 645b86f

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

README.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,19 @@ and then add to your schema:
1313

1414
```javascript
1515
const { Phone, UnixDate, CreditCard, State, ZipCode, DriversLicense } = require('gnt')
16-
17-
{
18-
name: 'Query',
19-
fields: {
20-
phone: { type: Phone },
21-
date: { type: UnixDate },
22-
card: { type: CreditCard },
23-
state: { type: State }
24-
zipcode: { type: ZipCode },
25-
license: { type: DriversLicense }
26-
}
27-
}
16+
const { makeExecutableSchema } = require('graphql-tools');
17+
18+
makeExecutableSchema({
19+
typeDefs: schemaString,
20+
resolvers: {
21+
Phone,
22+
UnixDate,
23+
CreditCard,
24+
USState: State,
25+
ZipCode,
26+
DriversLicense
27+
}
28+
});
2829
```
2930

3031
## Examples

0 commit comments

Comments
 (0)