-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Olympia - membership mappings and query node integration tests #2276
Olympia - membership mappings and query node integration tests #2276
Conversation
query-node/build.sh
Outdated
# Build graphql-server customizing DB name | ||
DB_NAME=${PROCESSOR_DB_NAME} yarn codegen:server | ||
# FIXME: Tmp add "declaration": true to query-node tsconfig | ||
sed -i 's/"compilerOptions": {/"compilerOptions": {\n "declaration": true,/' ./generated/graphql-server/tsconfig.json |
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.
sed -i 's/"compilerOptions": {/"compilerOptions": {\n "declaration": true,/' ./generated/graphql-server/tsconfig.json | |
sed -i.bak 's/"compilerOptions": {/"compilerOptions": {\n "declaration": true,/' ./generated/graphql-server/tsconfig.json | |
rm ./generated/graphql-server/tsconfig.json.bak |
Unfortunately, the `sed -i ` does not work on Mac 😞 The best we can do here is to use .bak
file and remove it (optionally).
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.
This shouldn't be necessary anymore with the hydra-cli 2.0.1-beta.17
version.
Based on issue #2303 I extended the mappings and implemented some changes:
Note that is is expected that the test check fails because the runtime has been updated on |
I realized that perhaps a better way to handle different events would be to have
It would then be much easier to query, filter and display recent events regardless of their type using just one query. The tradeoff is that in this case we wouldn't be able to enforce a specific event type for a relation, but it doesn't seem that bad compared to the potential benefits. In order for this to work we would need to be able to specify relations inside variants, which is currently not supported by Hydra, but I believe this is beeing worked on atm (Joystream/hydra#207) |
The main obstacle I see here is that this may not even be possible, as each union is unpacked as one table, and we would basically need on the order of one column per field per even type. I am not sure what the upper bound is and what the performance impact is on queries and mutations.
I am not sure I see why, can you elaborate?
Indeed, but do we need filtering & ordering on such relationships also? because that is not planned, not sure how feasible that is.
I do not believe you really need this here now, because you can query on the type by just using the native Hydra union case filtering based on JSONS. |
I didn't realize that Hydra supports |
cd6e5b7
to
b02ca25
Compare
This PR introduces mappings for membership module and updated testing setup and integration tests, which allow testing those mappings against current Olympia runtime.
PR based on #2249 in order to include relevant
@joystream/types
updates