-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support custom directives #26
Support custom directives #26
Conversation
2c6add9
to
c01d3ff
Compare
b7a78c5
to
a524ba7
Compare
a524ba7
to
a53f72a
Compare
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. See small comment below.
function g.test_util_map_name() | ||
local res = util.map_name(nil, nil) | ||
t.assert_equals(res, {}) | ||
res = util.map_name({ { name = 'a' }, { name = 'b' }, }, function(v) return v end) |
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 think we can test tables that contains not only numeric keys since we use "pairs" inside this function.
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.
Added new test case
GraphQL custom directives was introduced in spec #3.13 in October 2021 release [1]. Directives are the preferred way to extend GraphQL with custom or experimental behavior. This patch adds support of custom directives, as well as several location adjustments and repeatable directive option needed for full support of custom directives. This patch also adds introspection test for schema with custom directives to validate schema. Introspection of schema is described in spec #4.2 [2]. 1. https://spec.graphql.org/October2021/#sec-Type-System.Directives.Custom-Directives 2. https://spec.graphql.org/October2021/#sec-Schema-Introspection Based on PR #20 by @no1seman
a53f72a
to
cb448ae
Compare
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.
Can't add much value here. At least, as I see from tests, we able to catch content of a directive from a field resolver. So, it seems, this pull requests achieves its goal.
GraphQL custom directives was introduced in spec #3.13 in October 2021 release. Directives are the preferred way to extend GraphQL with custom or experimental behavior. This patch adds support of custom directives, as well as several location adjustments and repeatable directive option needed for full support of custom directives.
This patch also adds introspection test for schema with custom directives to validate schema. Introspection of schema is described in spec #4.2.
Based on PR #20 by @no1seman . No major changes was introduced: minor syntax and test cases fixes, add commit message description, removed #18 and #19 commits.