graphene
graphene copied to clipboard
KeyError when making shallow copy of GrapheneObjectType
Making shallow copies of GrapheneObjectType using copy.copy raises KeyError: 'graphene_type'
import graphene
import copy
class Query(graphene.ObjectType):
users = graphene.List(graphene.String)
def resolve_users(self, info):
return []
schema = graphene.Schema(query=Query)
copy.copy(schema.graphql_schema.query_type) # this line raises KeyError
This was tested using graphene==3.0b7 with python 3.8, and it's not happening in graphene<3