Repository navigation
Allow ConnectionFields to have ObjectTypes as per relay spec - #237
syrusakbary merged 9 commits into
Conversation
|
Changes Unknown when pulling 603d477 on Globegitter:connection-fields-object-types into * on graphql-python:master*. |
|
Changes Unknown when pulling 603d477 on Globegitter:connection-fields-object-types into * on graphql-python:master*. |
|
Also as a note, we are using this patch already locally in our graphene. So really hope this functionality makes it in. Even if it is in a different way with 1.0. I am also happy btw to make these last PRs agains the 1.0 branch if you want @syrusakbary |
`relay.Connection.for_node(NodeType)(edges=edges, page_info=relay.PageInfo(has_next_page=has_next_page))` in a resolver
|
Changes Unknown when pulling 2a288ea on Globegitter:connection-fields-object-types into * on graphql-python:master*. |
|
I know my last commit is not directly related but since I am already touching the code I thought I'd fix that here as well. This is something we notice when trying to return a Connection directly instead of a list, that it actually does not work with the given |
|
Changes Unknown when pulling 0d9e645 on Globegitter:connection-fields-object-types into * on graphql-python:master*. |
|
Changes Unknown when pulling 0d9e645 on Globegitter:connection-fields-object-types into * on graphql-python:master*. |
|
Changes Unknown when pulling 0d9e645 on Globegitter:connection-fields-object-types into * on graphql-python:master*. |
|
Good catch! I would like to merge. I'm refactoring the base code of graphene, so would be great if we have tests covering the use case so we assure support for this in the future (the tests will remain very similar even in the refactor). |
|
@syrusakbary Added tests for both fixes in here :) |
|
Changes Unknown when pulling 878391b on Globegitter:connection-fields-object-types into * on graphql-python:master*. |
In the Relay spec it says that the
nodeof aConnectionFielddoes not actually have to be a node but can also be an objectType: https://facebook.github.io/relay/graphql/connections.htm#sec-Node