Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit b046ce8

Browse files
committed
Merge branch 'sb/avro_arr'
Closes #48.
2 parents 3bb0528 + b3c1b85 commit b046ce8

9 files changed

+593
-20
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,44 @@ GraphQL queries on data from the local Tarantool's storage called spaces.
4747
It is planned to implement another data accessor that allows to fetch objects
4848
sharded using tarantool/shard module.
4949

50+
### Notes on types
51+
52+
User should distinguish between Object and Map types. Both of them consists of
53+
keys and values but there are some important differences.
54+
55+
While Object is a GraphQL built-in type, Map is a scalar-based type. In case of
56+
Object-based type all key-value pairs are set during type definition and values
57+
may have different types (as defined in the schema).
58+
59+
In contrast, set of valid Map keys is not defined in the schema, any key-value
60+
pair is valid despite name of the key while value has schema-determined type
61+
(which is the same among all values in the map).
62+
63+
Map-based types should be queried as a scalar type, not as an object type
64+
(because map's keys are not part of the schema).
65+
66+
The following example works:
67+
68+
```
69+
{
70+
71+
map_based_type
72+
73+
}
74+
```
75+
76+
The following example doesn't work:
77+
78+
```
79+
{
80+
81+
map_based_type {
82+
key_1
83+
}
84+
85+
}
86+
```
87+
5088
## Run tests
5189

5290
```
@@ -57,7 +95,7 @@ make test
5795

5896
## Requirements
5997

60-
* For use: tarantool, lulpeg, >=tarantool/shard-1.1-91-gfa88bf8 (optional),
98+
* For use: tarantool, lulpeg, >=tarantool/shard-1.1-91-gfa88bf8 (optional),
6199
tarantool/avro-schema.
62100
* For test (additionally to 'for use'): python 2.7, virtualenv, luacheck.
63101
* For building apidoc (additionally to 'for use'): ldoc.

0 commit comments

Comments
 (0)