-
Notifications
You must be signed in to change notification settings - Fork 766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DjangoObjectType Generates Wrong Schema on Arrayfield #536
Comments
Can't wait to make a PR. :) |
Has this issue been addressed already? |
@lucas-bremond it looks like #3 references this. Are you still experiencing the issue? |
@phalt It seems that #3 has nothing related to this issue. The reference record you see above is a PR to @Hispar own fork.
@lucas-bremond I don't think so. |
Thanks for clearing it up @helloqiu - adding this as an accepted change. Feel free to open a PR and contribute! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm experiencing this problem as well. It seems the pull request has stalled? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Same issue exists for
SolutionSimilar to OP's solution for model field, but instead uses |
Still having issue with converting ArrayField, where it's been shown as String in graphene schema, here is my code:
|
Description
Get wrong result for
python manage.py graphql_schema
.Here's an example repo which can make it more clear:
https://github.com/helloqiu/graphene_bug_example
If I define the model as followed:
and write the schema like this:
then run
python manage.py graphql_schema
, theString
insimpleArray
, which is an ArrayField, is nullable:Possible Solution
https://github.com/graphql-python/graphene-django/blob/master/graphene_django/converter.py#L212
I think we should restore
required
parameter afterbase_type = type(base_type)
.Something like this:
Maybe I will create a PR if this is verified as a bug by the maintainer.
The text was updated successfully, but these errors were encountered: