Skip to content
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

ScalarType: is there any purpose for renaming option specifiedByUrl (15.x) to specifiedByURL (16.x)? It affects on GraphQLJSON and other scalars distributed via npm #3156

Closed
nodkz opened this issue Jun 2, 2021 · 3 comments

Comments

@nodkz
Copy link
Contributor

nodkz commented Jun 2, 2021

Is there any purpose that in v16 was renamed the following property:

export class GraphQLScalarType {  
  name: string;  
  description: Maybe<string>; 
-  specifiedByUrl: Maybe<string>;
+  specifiedByURL: Maybe<string>;

v15.5 https://github.com/graphql/graphql-js/blob/15.x.x/src/type/definition.js#L578
v16.0.0-alpha.2 https://github.com/graphql/graphql-js/blob/main/src/type/definition.ts#L580


This change breaks specifiedByUrl definition for Scalars distributed via npm. Most popular is GraphQLJSON: https://github.com/taion/graphql-type-json/blob/master/src/index.js#L55-L56

@saihaj
Copy link
Member

saihaj commented Jun 2, 2021

@nodkz
Copy link
Contributor Author

nodkz commented Jun 2, 2021

@saihaj thanks for the reference. I think that @IvanGoncharov made a typo in his comment with specifiedByURL (should be specifiedByUrl). He definitely didn't want to bring such kind of breaking changes.

@saihaj
Copy link
Member

saihaj commented Jun 2, 2021

If you check the spec PR it is specifiedByURL so maybe you should raise this issue there

leszekhanusz added a commit to leszekhanusz/gql that referenced this issue Dec 13, 2021
leszekhanusz added a commit to graphql-python/gql that referenced this issue Jan 16, 2022
* Fix error 'graphql.error.graphql_error.GraphQLError: Names must only contain [_a-zA-Z0-9] but 'meta-field' does not.'

* Don't use format_error

* Put the is_finite method in the test file

* Fix StarWars schema

Fixes 'Support for returning GraphQLObjectType from resolve_type was removed in GraphQL-core 3.2, please return type name instead'

* fix print_ast removing last newline

* Fix error: AttributeError: 'ParseResultVisitor' object has no attribute 'enter_leave_map'

* Rename specifiedByUrl to specifiedByURL

See graphql/graphql-js#3156

* Bump graphql-core version to stable 3.2

This new version of GraphQL-core replaces the FrozenLists in AST nodes
with tuples, so we need to make the appropriate changes in dsl.py.

* Fix Introspection directive typing
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

No branches or pull requests

3 participants