-
Notifications
You must be signed in to change notification settings - Fork 829
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 core 3 2 #1417
Support core 3 2 #1417
Conversation
This fix aligns to some changes in GraphQL-core 3.2 which reflect changes in GraphQL.js 16: - type resolvers must return only names - doesn't print trailing newlines any more - different wording of some error messages
- graphql-relay from_global_id no longer throws an exception if we fail to decode the id. - So handle the case of it returning empty strings instead.
Still seeing one of the issue mentioned over there. ___________________________ test_example_end_to_end ____________________________
def test_example_end_to_end():
class Movie(graphene.ObjectType):
class Meta:
interfaces = (relay.Node,)
default_resolver = dict_resolver
name = graphene.String(required=True)
synopsis = graphene.String(required=True)
class Event(graphene.ObjectType):
class Meta:
interfaces = (relay.Node,)
default_resolver = dict_resolver
movie = graphene.Field(Movie, required=True)
date = graphene.types.datetime.Date(required=True)
def resolve_movie(event, info):
return TEST_DATA["movies"][event["movie"]]
class Query(graphene.ObjectType):
events = graphene.List(graphene.NonNull(Event), required=True)
def resolve_events(_, info):
return TEST_DATA["events"]
schema = graphene.Schema(query=Query)
query = """\
{
events {
__typename
id
date
movie {
__typename
id
name
synopsis
}
}
}
"""
result = schema.execute(query)
> assert not result.errors
E AssertionError: assert not [GraphQLError('ID cannot represent value: None', locations=[SourceLocation(line=8, column=21)], path=['events', 0, 'movie', 'id'])]
E + where [GraphQLError('ID cannot represent value: None', locations=[SourceLocation(line=8, column=21)], path=['events', 0, 'movie', 'id'])] = ExecutionResult(data=None, errors=[GraphQLError('ID cannot represent value: None', locations=[SourceLocation(line=8, column=21)], path=['events', 0, 'movie', 'id'])]).errors
graphene/utils/tests/test_deduplicator.py:151: AssertionError |
@mweinelt That test seems to pass OK.
|
@mweinelt can you tell me how to recreate that test failure? Because it isn't failing for me. |
That's a good question. We're running with
And for the tests:
|
@JonathanWylie could you add |
@ddelange Yes, I think this is all already included there. Thanks @JonathanWylie for this PR - I had not noticed that you already fixed this, as I'm not watching Graphene very closely. So I am closing this now. If there are still any issue with Core 3.2, let me know and I will take care. |
Complete the fixes for: #1378