-
Notifications
You must be signed in to change notification settings - Fork 3
[WIP] Sb/avro arr #48
Changes from 28 commits
589778a
417c83e
24ec6c4
9a43096
6bd1ca2
31897d6
f0fb9f4
ac9f0ed
8110208
f50f9fc
043d6f9
7714393
470e8e1
0160c69
19b8d8b
1377c75
5af08d8
be8457c
fec3b31
0423ec4
a936771
c8abf95
951e7ea
91bd8bf
148f69f
d9a7623
31abefa
1f2583a
e406a31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,42 @@ GraphQL queries on data from the local Tarantool's storage called spaces. | |
It is planned to implement another data accessor that allows to fetch objects | ||
sharded using tarantool/shard module. | ||
|
||
### Notes on types | ||
|
||
User should distinguish between Object and Map types. Both of them consists of | ||
keys and values but there are some important differences. | ||
|
||
While Object is a GraphQL | ||
built-in type, Map is a scalar-based type. In case of Object-based type | ||
all key-value pairs are set during type definition and values may have different | ||
arbitrary types. | ||
|
||
In contrast, all values of Map-based type must have the same | ||
type and specific key-value pairs are not set during type definition. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. specific key-value pairs are not set during type definition → set of valid keys is not defined in the schema, any key-value pair is valid despite name of the key while value has schema-determined type; what do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. set of valid keys is not defined in the schema, any key-value pair is valid despite name of the key while value has schema-determined type (which is the same among all values in the map) ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. |
||
|
||
Map-based types should be queried as a scalar type, not as an object type | ||
(because map's keys are not part of the schema) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Period at the end. |
||
|
||
|
||
This works | ||
``` | ||
{ | ||
… | ||
map_based_type | ||
… | ||
} | ||
``` | ||
|
||
This doesn't work | ||
``` | ||
{ | ||
… | ||
map_based_type { | ||
key_1 | ||
} | ||
… | ||
} | ||
``` | ||
## Run tests | ||
|
||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
different arbitrary types → different types as defined in the schema; what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your variant is more specific.