Commit 39df5ecd authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[graphql] README updated, some refactoring

parent b19e86ef
Pipeline #1996 failed with stage
in 10 minutes and 25 seconds
...@@ -196,3 +196,36 @@ To build documentation, run: ...@@ -196,3 +196,36 @@ To build documentation, run:
stack --docker build --haddock --no-haddock-deps --fast stack --docker build --haddock --no-haddock-deps --fast
``` ```
## GraphQL
Some introspection information.
Playground is located at http://localhost:8008/gql
### List all GraphQL types in the Playground
```
{
__schema {
types {
name
}
}
}
```
### List details about a type in GraphQL
```
{
__type(name:"User") {
fields {
name
description
type {
name
}
}
}
}
```
...@@ -98,11 +98,11 @@ defaultContactWho :: ContactWho ...@@ -98,11 +98,11 @@ defaultContactWho :: ContactWho
defaultContactWho = contactWho "Pierre" "Dupont" defaultContactWho = contactWho "Pierre" "Dupont"
contactWho :: FirstName -> LastName -> ContactWho contactWho :: FirstName -> LastName -> ContactWho
contactWho fn ln = ContactWho Nothing contactWho fn ln = ContactWho { _cw_id = Nothing
(Just fn) , _cw_firstName = Just fn
(Just ln) , _cw_lastName = Just ln
[] , _cw_keywords = []
[] , _cw_freetags = [] }
data ContactWhere = data ContactWhere =
ContactWhere { _cw_organization :: [Text] ContactWhere { _cw_organization :: [Text]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment