Skip to content

Commit

Permalink
move codegen to own package
Browse files Browse the repository at this point in the history
  • Loading branch information
roryc89 committed Sep 14, 2023
1 parent b0c792b commit e66efe0
Show file tree
Hide file tree
Showing 69 changed files with 7,456 additions and 824 deletions.
14 changes: 14 additions & 0 deletions codegen/schema/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/bower_components/
node_modules/
/.pulp-cache/
output/
/generated-docs/
/.psc-package/
/.psc*
/.purs*
/.psa*
/.spago
/.vscode
/src/test-output/
.env
/cache/
10 changes: 0 additions & 10 deletions codegen/schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ Argument for generateSchema
{ moduleName :: String
, typeName :: String
}
-- | 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 ::
Nullable
( Object
{ moduleName :: String
, typeName :: String
}
)
-- | Override exsting types.
-- | The outer object key is the name of the purescript type.
-- | The inner object key is the field name / purescript label
Expand Down
72 changes: 72 additions & 0 deletions codegen/schema/packages.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.15.7-20230408/packages.dhall
sha256:eafb4e5bcbc2de6172e9457f321764567b33bc7279bd6952468d0d422aa33948

in upstream
with tidy-codegen =
{ dependencies =
[ "aff"
, "ansi"
, "arrays"
, "avar"
, "bifunctors"
, "console"
, "control"
, "dodo-printer"
, "effect"
, "either"
, "enums"
, "exceptions"
, "filterable"
, "foldable-traversable"
, "free"
, "identity"
, "integers"
, "language-cst-parser"
, "lazy"
, "lists"
, "maybe"
, "newtype"
, "node-buffer"
, "node-child-process"
, "node-fs-aff"
, "node-path"
, "node-process"
, "node-streams"
, "ordered-collections"
, "parallel"
, "partial"
, "posix-types"
, "prelude"
, "record"
, "safe-coerce"
, "st"
, "strings"
, "tidy"
, "transformers"
, "tuples"
, "type-equality"
, "unicode"
]
, repo = "https://github.com/natefaubion/purescript-tidy-codegen.git"
, version = "v4.0.0"
}
with language-cst-parser =
(upstream.language-cst-parser with version = "v0.13.0")
with tidy =
{ dependencies =
[ "arrays"
, "dodo-printer"
, "foldable-traversable"
, "lists"
, "maybe"
, "ordered-collections"
, "partial"
, "prelude"
, "language-cst-parser"
, "strings"
, "tuples"
]
, repo = "https://github.com/natefaubion/purescript-tidy.git"
, version = "v0.10.0"
}
75 changes: 75 additions & 0 deletions codegen/schema/spago.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{-
Welcome to a Spago project!
You can edit this file as you like.
-}
{ name = "graphql-client"
, repository = "https://github.com/OxfordAbstracts/purescript-graphql-client"
, license = "MIT"
, dependencies =
[ "aff"
, "aff-promise"
, "affjax"
, "affjax-node"
, "affjax-web"
, "argonaut-codecs"
, "argonaut-core"
, "argonaut-generic"
, "arrays"
, "bifunctors"
, "console"
, "control"
, "datetime"
, "debug"
, "effect"
, "either"
, "enums"
, "exceptions"
, "filterable"
, "foldable-traversable"
, "foreign"
, "foreign-object"
, "functions"
, "halogen-subscriptions"
, "heterogeneous"
, "http-methods"
, "integers"
, "language-cst-parser"
, "lists"
, "literals"
, "maybe"
, "media-types"
, "newtype"
, "node-buffer"
, "node-fs"
, "now"
, "nullable"
, "numbers"
, "ordered-collections"
, "parsing"
, "partial"
, "prelude"
, "profunctor"
, "profunctor-lenses"
, "psci-support"
, "quickcheck"
, "record"
, "record-studio"
, "spec"
, "spec-discovery"
, "string-parsers"
, "strings"
, "strings-extra"
, "tidy-codegen"
, "transformers"
, "tuples"
, "typelevel-lists"
, "typelevel-prelude"
, "unfoldable"
, "unicode"
, "unsafe-coerce"
, "untagged-union"
, "variant"
]
, packages = ./packages.dhall
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
}
Loading

0 comments on commit e66efe0

Please sign in to comment.