Skip to content

Commit

Permalink
rewrites schema codegen using tidy codegen #60
Browse files Browse the repository at this point in the history
  • Loading branch information
roryc89 committed Sep 4, 2023
1 parent f68eb86 commit 53ba51f
Show file tree
Hide file tree
Showing 14 changed files with 9,909 additions and 7,573 deletions.
2 changes: 1 addition & 1 deletion codegen/schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Argument for generateSchema
-- | External scalar types. The object key is the name of the scalar type in the graphQL schema.
-- | When the scalar type is encountered it will be set at the type in the provided module
-- | Useful for handling custom scalar types such as `Date`
, externalTypes ::
, gqlToPursTypes ::
Nullable
( Object
{ moduleName :: String
Expand Down
4 changes: 2 additions & 2 deletions examples/8-custom-gql-types/generate-purs-schema.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// In your code replace this line with the npm package:
// const { generateSchema } = require('purescript-graphql-client')
// import { generateSchema } = from 'purescript-graphql-client'
import { generateSchema } from '../../codegen/schema/index.mjs'

export default () =>
Expand All @@ -8,7 +8,7 @@ export default () =>
modulePath: ['Generated', 'Gql', 'Admin'],
useNewtypesForRecords: false,
url: 'http://localhost:4000/graphql',
gqlScalarsToPursTypes: {
gqlToPursTypes: {
GqlTypeThatIsAString: 'String',
GqlTypeThatIsAnInt: 'Int'
}
Expand Down
Loading

0 comments on commit 53ba51f

Please sign in to comment.