graphql-python / graphene

GraphQL framework for Python
http://graphene-python.org/
MIT License
8.1k stars 828 forks source link

When passing the empty string to Date Type, it occurs `IndexError: string index out of range` #1571

Closed KaniKim closed 4 months ago

KaniKim commented 4 months ago

image image

When I passed a empty string to Date Field, It occurs GraphQL 400 error, with message, IndexError: string index out of range

And then I found that aniso8601 module occurs this error. Are there any solutions to prevent this one?

I can just pass a null to Date, but I think there are more proper way to handle this problem.

If the behavior of sending empty string is wrong, I think this would be good time to change module or package

erikwrede commented 4 months ago

Hey, this should be fixed in Graphene 3, as we don't rely on aniso anymore.

KaniKim commented 4 months ago

@erikwrede I apologize for not noticing. I will be more careful next time. Thank you for letting me know.