Skip to content

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