graphql-python / graphql-python/graphql-core-legacy
`schema_printer._print_object` should return interfaces joined with '&' instead of ','
- Lingua principale
- Python
- Stelle
- 372
- Fork
- 175
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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!
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.