Skip to content

Allow creation of custom connections. Fixes #65. #94

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

Closed
wants to merge 1 commit into from
Closed

Allow creation of custom connections. Fixes #65. #94

wants to merge 1 commit into from

Conversation

geertjanvdk
Copy link

Previously, it was not possible to create custom connections without
monkey patching graphene.relay.connection. Custom connections are
useful when all connections need a total count for paging, for example.

We change the SQLAlchemyObjectType.__init_subclass_with_meta method
so that when the connection argument is a class, it is used to create
the new connection type.

A test case has been added to check usage of custom connections. The
conftest.py was added to allow pytest using database related fixtures
in other places than test_query.py.

Previously, it was not possible to create custom connections without
monkey patching graphene.relay.connection. Custom connections are
useful when all connections need a total count for paging, for example.

We change the SQLAlchemyObjectType.__init_subclass_with_meta method
so that when the connection argument is a class, it is used to create
the new connection type.

A test case has been added to check usage of custom connections. The
`conftest.py` was added to allow pytest using database related fixtures
in other places than `test_query.py`.
@coveralls
Copy link

coveralls commented Nov 22, 2017

Coverage Status

Coverage increased (+0.2%) to 91.186% when pulling 18dd02a on geertjanvdk:fix/65 into 4827ce2 on graphql-python:master.

@syrusakbary
Copy link
Member

Closing this PR in favor of already merged #143

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.

3 participants