FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
graphql-server/tests/utils.py at python3.12 · graphql-python/graphql-server · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
graphql-python
/
graphql-server
Public
Notifications
You must be signed in to change notification settings
Fork
70
Star
134
Code
Issues
5
Pull requests
2
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
graphql-server
/
tests
/
utils.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (18 loc) · 698 Bytes
Breadcrumbs
graphql-server
/
tests
/
utils.py
Copy path
File metadata and controls
23 lines (18 loc) · 698 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from
typing
import
List
from
graphql
import
ExecutionResult
from
graphql
.
execution
import
ExecutionContext
def
as_dicts
(
results
:
List
[
ExecutionResult
]):
"""Convert execution results to a list of tuples of dicts for better comparison."""
return
[
{
"data"
:
result
.
data
,
"errors"
: [
error
.
formatted
for
error
in
result
.
errors
]
if
result
.
errors
else
result
.
errors
,
}
for
result
in
results
]
class
RepeatExecutionContext
(
ExecutionContext
):
def
execute_field
(
self
,
parent_type
,
source
,
field_nodes
,
path
):
result
=
super
().
execute_field
(
parent_type
,
source
,
field_nodes
,
path
)
return
result
*
2
Back
|
FazBrowse Home
|
New Git URL