Skip to content

Conversation

@no1seman
Copy link

@no1seman no1seman commented Oct 3, 2021

add SpecifiedByUrl for custom Scalars and also SpecifiedByUrl directive acc. #3.5, #4.2.2 of GraphQL spec draft: http://spec.graphql.org/draft/

@no1seman no1seman requested review from Totktonada and olegrok October 3, 2021 07:15
Copy link
Collaborator

@olegrok olegrok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message still is empty. Please fix it. Also see my comments below.

Comment on lines 1374 to 1377
t.assert_equals(tostring(util.map_name(data.__schema.types, function(v) return v end)['CustomInt'].specifiedByUrl), 'http://localhost')
t.assert_equals(
tostring(util.map_name(data.__schema.types, function(v) return v end)['CustomInt'].specifiedByUrl),
'http://localhost'
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit should be squashed into previous one.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit should be squashed into previous one.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? It'a a test for SpecifiedByUrl field for custom Scalar. Please explain more detailed why this have to squashed into previous commit?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I talk about commit "Fix lint warning".
All changes should be atomic. But here you introduces "Add Scalar specifiedByUrl field and specifiedByUrl directive" a code that breaks linter and fixes it the following commit.

"Add Scalar specifiedByUrl field and specifiedByUrl directive" should be self-sufficient and shouldn't request some follow-ups to fix it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

local data, errors = check_request(introspection.query, query_schema)
t.assert_equals(tostring(util.map_name(data.__schema.types, function(v) return v end)['CustomInt'].specifiedByUrl), 'http://localhost')
t.assert_equals(errors, nil)
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git warns about missing empty line

}

local data, errors = check_request(introspection.query, query_schema)
t.assert_equals(tostring(util.map_name(data.__schema.types, function(v) return v end)['CustomInt'].specifiedByUrl), 'http://localhost')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need tostring here?

DifferentialOrange pushed a commit that referenced this pull request Nov 19, 2021
When defining a custom scalar, GraphQL services should provide a scalar
specification URL via the @specifiedBy directive or the specifiedByURL
introspection field (spec. #3.5 [1]). This patch introduces support of
this tools.

1. https://spec.graphql.org/draft/#sec-Scalars.Custom-Scalars

Based on PR #21 by @no1seman
DifferentialOrange pushed a commit that referenced this pull request Nov 19, 2021
When defining a custom scalar, GraphQL services should provide a scalar
specification URL via the @specifiedBy directive or the specifiedByURL
introspection field (spec. #3.5 [1]). This patch introduces support of
these tools.

1. https://spec.graphql.org/draft/#sec-Scalars.Custom-Scalars

Based on PR #21 by @no1seman
@DifferentialOrange
Copy link
Member

I was finishing this PR as a part of this sprint tasks. You can see reworked version in #27 . Since this PR is based on branch of no1seman/graphql and I don't think it's nice to force-push to other people forks' branches, I opened a new one.

DifferentialOrange pushed a commit that referenced this pull request Nov 23, 2021
When defining a custom scalar, GraphQL services should provide a scalar
specification URL via the @specifiedBy directive or the specifiedByURL
introspection field (spec. #3.5 [1]). This patch introduces support of
these tools.

1. https://spec.graphql.org/draft/#sec-Scalars.Custom-Scalars

Based on PR #21 by @no1seman
DifferentialOrange pushed a commit that referenced this pull request Nov 23, 2021
When defining a custom scalar, GraphQL services should provide a scalar
specification URL via the @specifiedBy directive or the specifiedByURL
introspection field (spec. #3.5 [1]). This patch introduces support of
these tools.

1. https://spec.graphql.org/draft/#sec-Scalars.Custom-Scalars

Based on PR #21 by @no1seman
DifferentialOrange pushed a commit that referenced this pull request Nov 30, 2021
When defining a custom scalar, GraphQL services should provide a scalar
specification URL via the @specifiedBy directive or the specifiedByURL
introspection field (spec. #3.5 [1]). This patch introduces support of
these tools.

1. https://spec.graphql.org/draft/#sec-Scalars.Custom-Scalars

Based on PR #21 by @no1seman
Totktonada pushed a commit that referenced this pull request Nov 30, 2021
When defining a custom scalar, GraphQL services should provide a scalar
specification URL via the @specifiedBy directive or the specifiedByURL
introspection field (spec. #3.5 [1]). This patch introduces support of
these tools.

1. https://spec.graphql.org/draft/#sec-Scalars.Custom-Scalars

Based on PR #21 by @no1seman
@Totktonada
Copy link

Pushed in PR #27.

@Totktonada Totktonada closed this Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants