-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: type Rich Text and Title fields with custom PrismicStructuredTe…
…xt scalar (#473)
- Loading branch information
1 parent
e8f52c2
commit 5737479
Showing
8 changed files
with
1,193 additions
and
999 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as gatsby from "gatsby"; | ||
import * as gqlc from "graphql-compose"; | ||
import * as RTE from "fp-ts/ReaderTaskEither"; | ||
|
||
import { Dependencies } from "../types"; | ||
|
||
/** | ||
* Builds a GraphQL scalar type using the environment's `buildScalarType` function. | ||
* | ||
* @param config - Configuration for the scalar type. | ||
* | ||
* @returns Return value of the environment's `buildScalarType` function. | ||
*/ | ||
export const buildScalarType = ( | ||
config: gqlc.ScalarTypeComposerAsObjectDefinition, | ||
): RTE.ReaderTaskEither<Dependencies, never, gatsby.GatsbyGraphQLScalarType> => | ||
RTE.asks((deps) => deps.buildScalarType(config)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters