graphql-python / graphql-python/graphql-core-legacy
`schema_printer._print_object` should return interfaces joined with '&' instead of ','
- Dominant language
- Python
- Stars
- 372
- Forks
- 175
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/graphql-python/graphql-core/blame/master/graphql/utils/schema_printer.py#L132
```python
def _print_object(type):
# type: (GraphQLObjectType) -> str
interfaces = type.interfaces
implemented_interfaces = (
" implements {}".format(", ".join(i.name for i in interfaces))
if interfaces
else ""
)
```
https://facebook.github.io/graphql/draft/#sec-Interfaces
```gql
type Business implements NamedEntity & ValuedEntity {
name: String
value: Int
employeeCount: Int
}
```
I do think we can use `&` instead of `,` here, so we can simply print schema to a file rather than fetching it through [graphql get-schema](https://github.com/graphql-cli/graphql-cli) in JavaScript world.
I compare both of them which was generated in my project and find the only difference, [even better with descriptions](https://github.com/graphql-python/graphql-core/issues/217).
Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.