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

[WIP] Sb/avro arr #48

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
589778a
add comments on gql queries assert and compile functions
SudoBobo Feb 19, 2018
417c83e
do small refactor; add comments
SudoBobo Feb 20, 2018
24ec6c4
add support for array avro type (only with scalars); change args
SudoBobo Feb 21, 2018
9a43096
simplify conditional statements
SudoBobo Feb 22, 2018
6bd1ca2
add mised simple test for array support
SudoBobo Feb 22, 2018
31897d6
add simple test for array avro type usage
SudoBobo Feb 23, 2018
f0fb9f4
move nullable function to utils as it is will be
SudoBobo Feb 23, 2018
ac9f0ed
readability refactor; clean up comments;
SudoBobo Feb 23, 2018
8110208
Update tarantool_graphql.lua
SudoBobo Feb 23, 2018
f50f9fc
Merge remote-tracking branch 'origin/sb/avro_arr' into sb/avro_arr
SudoBobo Feb 24, 2018
043d6f9
small style fixes
SudoBobo Feb 25, 2018
7714393
readability and comments fixes
SudoBobo Feb 26, 2018
470e8e1
remove excess test
SudoBobo Feb 26, 2018
0160c69
remove redundant 'map' test cases
SudoBobo Feb 26, 2018
19b8d8b
fix small error; now general convert_scalar_type accepts nil as opt
SudoBobo Feb 26, 2018
1377c75
add test for avro-array usage (with space accessor);
SudoBobo Feb 26, 2018
5af08d8
move nullable back to tarantool_graphql from utils
SudoBobo Feb 26, 2018
be8457c
add support of avro map and test for simple case with scalar map values
SudoBobo Feb 27, 2018
fec3b31
add test for map with space accessor
SudoBobo Feb 27, 2018
0423ec4
add gql support of avro map/array with records as items/values
SudoBobo Feb 28, 2018
a936771
style/readability fixes after review
SudoBobo Feb 28, 2018
c8abf95
remove executable bit
SudoBobo Feb 28, 2018
951e7ea
add info about Map
SudoBobo Feb 28, 2018
91bd8bf
typo fix
SudoBobo Feb 28, 2018
148f69f
Merge branch 'master' into sb/avro_arr
SudoBobo Feb 28, 2018
d9a7623
remove whitespaces at the end of lines
SudoBobo Feb 28, 2018
31abefa
Merge remote-tracking branch 'origin/sb/avro_arr' into sb/avro_arr
SudoBobo Feb 28, 2018
1f2583a
remove all debug prints
SudoBobo Feb 28, 2018
e406a31
make Map and Object explanation more specific
SudoBobo Feb 28, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member

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?

Copy link
Contributor Author

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.


In contrast, all values of Map-based type must have the same
type and specific key-value pairs are not set during type definition.
Copy link
Member

Choose a reason for hiding this comment

The 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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) ?

Copy link
Member

Choose a reason for hiding this comment

The 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)
Copy link
Member

Choose a reason for hiding this comment

The 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

```
Expand Down
Loading