-
Notifications
You must be signed in to change notification settings - Fork 3
Fix name clash b/w 1:1 connections and collections #204
Conversation
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.
LGTM.
Don’t forget to update instrospection.test.lua before merge.
Minor comments are below.
|
||
local graphql = require('graphql') | ||
|
||
box.cfg{ wal_mode = "none" } |
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.
Why?
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.
I put it because it was in all other /extra tests.
As original author of this tests says, wal_mode = "mode"
speed ups tests. But in this test it is useless.
Removed.
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.
Ouch, I didn’t know that this is common way to write extra tests. So, I vote to get it back for consistency.
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.
Ok then.
graphql/convert_schema/types.lua
Outdated
@@ -373,7 +373,7 @@ function types.convert(state, avro_schema, opts) | |||
if context == nil then | |||
context = { | |||
field_name = nil, | |||
path = {}, | |||
path = {'results'} |
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.
By the way, I prefer to have dangling commas, it makes further diffs easier to read.
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.
Ok, reasonable, fixed as you say.
} | ||
} | ||
|
||
local accessor_1 = graphql.accessor_space.new({ |
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.
Proposed to move to graphql.new
.
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.
Ok, fixed.
} | ||
}]]) | ||
|
||
local accessor_2 = graphql.accessor_space.new({ |
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.
Proposed to move to graphql.new
.
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.
Fxd.
|
||
test:isnt(gql_wrapper_2, nil) | ||
|
||
-- Potential lash between second ("hero_meta_collection") and third |
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.
lash → clash
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.
Fxd.
} | ||
}]]) | ||
|
||
local accessor_3 = graphql.accessor_space.new({ |
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.
Proposed to move to graphql.new
.
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.
Fxd.
786d90e
to
7ad3218
Compare
Before we could not use the same name for collection and 1:1 connection (or collection and 1:1 multi-head connection variant) because this created two different types with same names in GraphQL schema: Object type for collection and InputObject type for connection. Now we can use the same names, since we add 'result_' to the name of GraphQL collection Object type. Close #191, close #104
7ad3218
to
019f2b6
Compare
Before we could not use the same name for collection and 1:1 connection (or collection and 1:1 multi-head connection variant) because this created two different types with same names in GraphQL schema: Object type for collection and InputObject type for connection. Now we can use the same names, since we add 'result_' to the name of GraphQL collection Object type.
Close #191, close #104