Skip to content
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

Return Type of complete_list_value #132

Closed
cancan101 opened this issue May 5, 2021 · 4 comments
Closed

Return Type of complete_list_value #132

cancan101 opened this issue May 5, 2021 · 4 comments
Assignees

Comments

@cancan101
Copy link

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]]:

@Cito Cito self-assigned this May 5, 2021
@Cito Cito closed this as completed in 8b9f960 May 5, 2021
@Cito
Copy link
Member

Cito commented May 5, 2021

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

@cancan101
Copy link
Author

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

@Cito
Copy link
Member

Cito commented May 5, 2021

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

@cancan101
Copy link
Author

That looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants