Skip to content

Commit 53ba51f

Browse files
committed
rewrites schema codegen using tidy codegen #60
1 parent f68eb86 commit 53ba51f

File tree

14 files changed

+9909
-7573
lines changed

14 files changed

+9909
-7573
lines changed

Diff for: codegen/schema/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Argument for generateSchema
9191
-- | External scalar types. The object key is the name of the scalar type in the graphQL schema.
9292
-- | When the scalar type is encountered it will be set at the type in the provided module
9393
-- | Useful for handling custom scalar types such as `Date`
94-
, externalTypes ::
94+
, gqlToPursTypes ::
9595
Nullable
9696
( Object
9797
{ moduleName :: String

Diff for: examples/8-custom-gql-types/generate-purs-schema.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// In your code replace this line with the npm package:
2-
// const { generateSchema } = require('purescript-graphql-client')
2+
// import { generateSchema } = from 'purescript-graphql-client'
33
import { generateSchema } from '../../codegen/schema/index.mjs'
44

55
export default () =>
@@ -8,7 +8,7 @@ export default () =>
88
modulePath: ['Generated', 'Gql', 'Admin'],
99
useNewtypesForRecords: false,
1010
url: 'http://localhost:4000/graphql',
11-
gqlScalarsToPursTypes: {
11+
gqlToPursTypes: {
1212
GqlTypeThatIsAString: 'String',
1313
GqlTypeThatIsAnInt: 'Int'
1414
}

0 commit comments

Comments
 (0)