You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing, you may want to check the type of a node as it will appear in the final GraphQL schema. If you've called schema.to_graphql() to finalize the types, then because of caching you can do node1.type is User.non_null.list and it will compare equal by identity. But this won't work for wrapping types that were created from string references, such as NonNull("User").list, because only the properties can cache.
It would be useful to always get the node's type as a string, such as "[User!]", regardless of if you specified the type as a string or an instance. Add a type_str property to make it possible to do node.type_str == "[User!]".
The text was updated successfully, but these errors were encountered:
When testing, you may want to check the type of a node as it will appear in the final GraphQL schema. If you've called
schema.to_graphql()
to finalize the types, then because of caching you can donode1.type is User.non_null.list
and it will compare equal by identity. But this won't work for wrapping types that were created from string references, such asNonNull("User").list
, because only the properties can cache.It would be useful to always get the node's type as a string, such as
"[User!]"
, regardless of if you specified the type as a string or an instance. Add atype_str
property to make it possible to donode.type_str == "[User!]"
.The text was updated successfully, but these errors were encountered: