You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-11Lines changed: 2 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,13 +102,7 @@ spago install graphql-client
102
102
103
103
### Schema
104
104
105
-
In order to use this library you will need a Purescript representation of your GraphQL schema.
106
-
107
-
To get started you can convert your grapqhl schema into a purescript schema, using the codegen tool at https://gql-query-to-purs.herokuapp.com . If you are just testing this library out you can paste your graphql schema on the left, copy the purescript schema from the right and add it to your codebase.
108
-
109
-
If you are looking for a production solution to schema codegen read the rest of this section. If you are just trying the library out, you can skip to the next section.
110
-
111
-
It is possible to write the schema yourself but it is easier and safer to use the library's codegen tools.
105
+
In order to use this library you will need a Purescript representation of your GraphQL schema - this library provides codegen tools to achieve this.
112
106
113
107
There is an npm library that is a thin wrapper around this library's schema codegen. First, install this package:
114
108
@@ -263,9 +257,6 @@ API documentation can be found at https://pursuit.purescript.org/packages/puresc
263
257
264
258
Once you are set up and have generated your purescript schema. You can write your queries.
265
259
266
-
The easiest way to do this is to go to https://gql-query-to-purs.herokuapp.com/query and paste your
267
-
graphql query on the left. I usually copy the GraphQL query directly from GraphiQL (GraphQL IDE).
268
-
269
260
You have to the option to make the queries with either `unit`s to mark scalar values (leaf nodes) or symbol record puns. The symbol record puns are slightly less verbose and closer to GraphQL syntax but require you import the generated Symbols module.
270
261
271
262
### Decoding and Encoding JSON
@@ -291,7 +282,7 @@ result <- queryWithDecoder decodeHasura client "query_to_hasura_service"
291
282
292
283
### Arguments
293
284
294
-
Arguments can be added using the `Args` constructor or the `=>>` operator. I recommend using the [query codegen tool](https://gql-query-to-purs.herokuapp.com/query) to test this out and see how it works.
285
+
Arguments can be added using the `Args` constructor or the `=>>` operator.
295
286
296
287
As GraphQL arguments may have mixed types, the library provides tools to help handle this.
0 commit comments