Last active
August 5, 2019 12:59
-
-
Save hendrikniemann/39054e783ccd857d7cccc1d9604db307 to your computer and use it in GitHub Desktop.
Medium Post: Why is a pure FP GraphQL implementation so hard to build?
This file contains hidden or 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
| postType :: GraphQL.ObjectType Context (Maybe Post) | |
| postType = | |
| GraphQL.objectType | |
| "Post" | |
| (Just "A blog post that is persisted in the database.") | |
| { comments: | |
| GraphQL.field | |
| (GraphQL.nonNull $ GraphQL.list $ GraphQL.nonNull GraphQL.string) | |
| (Just "The title of this blog post.") | |
| { max: | |
| GraphQL.argument | |
| GraphQL.id | |
| (Just "The unique id that references this post.") | |
| } | |
| ?resolver -- resolver :: Post -> { max: Maybe Int } -> Context -> Aff (Array Comment) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment