Skip to content

Commit

Permalink
Add example of using argo:display/1 to README.
Browse files Browse the repository at this point in the history
  • Loading branch information
potatosalad committed Apr 29, 2024
1 parent f01ed1f commit 1dee568
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,32 @@ JsonEncoded = jsone:encode(JsonValue),
JsonResponse = argo_value:to_json(ArgoValue).
```

Use `argo:display/1` or `argo:display_with_lines/1` to inspect Argo Wire Types, Argo Values, and GraphQL related data structures:

```erlang
argo:display(ArgoWireType).
% {
% data: {
% me: {
% name: STRING<String>?
% }?
% }?
% errors?: ERROR[]
% extensions?: EXTENSIONS
% }

argo:display(ArgoValue).
% {
% data: NON_NULL({
% me: NON_NULL({
% name: NON_NULL(STRING(<<"Luke Skywalker">>)<String>)
% })
% })
% errors?: ABSENT
% extensions?: ABSENT
% }
```

## License

`argo` is MIT licensed, as found in the [LICENSE](LICENSE.md) file.

0 comments on commit 1dee568

Please sign in to comment.