set field name explicitly
tasiotas opened this issue · 1 comments
tasiotas commented
Hi,
How can I set field name explicitly? By default field name is derived from class name. Can I override it?
In ObjectType source I can see comment that its possible, but I cannot get it working.
I have
class MediaItemType(DjangoObjectType):
class Meta:
model = UserMediaItem
name = "MediaItem" # <--- that doesnt work
Would like to have field called mediaitemSet
not usermediaitemSet
. Btw. this Model is a ForeignKey, hence 'Set' at the end.
From types/objecttype.py
Meta class options (optional):
name (str): Name of the GraphQL type (must be unique in schema). Defaults to class
name.
tasiotas commented
sorry, I posted it in wrong repo, its about graphene-django