Skip to content

Commit 1dee568

Browse files
committed
Add example of using argo:display/1 to README.
1 parent f01ed1f commit 1dee568

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,32 @@ JsonEncoded = jsone:encode(JsonValue),
7575
JsonResponse = argo_value:to_json(ArgoValue).
7676
```
7777

78+
Use `argo:display/1` or `argo:display_with_lines/1` to inspect Argo Wire Types, Argo Values, and GraphQL related data structures:
79+
80+
```erlang
81+
argo:display(ArgoWireType).
82+
% {
83+
% data: {
84+
% me: {
85+
% name: STRING<String>?
86+
% }?
87+
% }?
88+
% errors?: ERROR[]
89+
% extensions?: EXTENSIONS
90+
% }
91+
92+
argo:display(ArgoValue).
93+
% {
94+
% data: NON_NULL({
95+
% me: NON_NULL({
96+
% name: NON_NULL(STRING(<<"Luke Skywalker">>)<String>)
97+
% })
98+
% })
99+
% errors?: ABSENT
100+
% extensions?: ABSENT
101+
% }
102+
```
103+
78104
## License
79105

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

0 commit comments

Comments
 (0)