Skip to content

Return Type of complete_list_value #132

Closed
@cancan101

Description

@cancan101

Any reason that the return type of complete_list_value is AwaitableOrValue[Any] rather than AwaitableOrValue[List[Any]]:

def complete_list_value(
self,
return_type: GraphQLList[GraphQLOutputType],
field_nodes: List[FieldNode],
info: GraphQLResolveInfo,
path: Path,
result: Iterable[Any],
) -> AwaitableOrValue[Any]:

For comparison, execute_fields returns AwaitableOrValue[Dict[str, Any]]:

def execute_fields(
self,
parent_type: GraphQLObjectType,
source_value: Any,
path: Optional[Path],
fields: Dict[str, List[FieldNode]],
) -> AwaitableOrValue[Dict[str, Any]]:

Activity

self-assigned this
on May 5, 2021
Cito

Cito commented on May 5, 2021

@Cito
Member

Thank you, good catch! I've fixed it already.

cancan101

cancan101 commented on May 5, 2021

@cancan101
Author

@Cito I think you also want to update the return types of get_completed_results, etc (the inner / helper functions).

Cito

Cito commented on May 5, 2021

@Cito
Member

Yes, but only one of them needed to be changed (5bfc3a0). Anything else I overlooked?

cancan101

cancan101 commented on May 5, 2021

@cancan101
Author

That looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Return Type of complete_list_value · Issue #132 · graphql-python/graphql-core