Skip to content

Commit 63a7de8

Browse files
committed
chore: unpin graphql-core
1 parent 2e6eabd commit 63a7de8

File tree

19 files changed

+30
-40
lines changed

19 files changed

+30
-40
lines changed

python_modules/dagit/dagit/format_error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Any, Dict
22

3-
from graphql.error.base import GraphQLError
3+
from graphql.error import GraphQLError
44

55
from dagster.utils.log import get_stack_trace_array
66

python_modules/dagit/dagit/graphql.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from graphql.error import format_error as format_graphql_error
1010
from graphql.execution import ExecutionResult
1111
from rx import Observable
12-
from rx.concurrency import thread_pool_scheduler
12+
from rx.scheduler import ThreadPoolScheduler
1313
from starlette import status
1414
from starlette.applications import Starlette
1515
from starlette.concurrency import run_in_threadpool
@@ -300,6 +300,7 @@ def _disposable_and_async_gen_from_obs(obs: Observable, loop):
300300
queue: Queue = Queue()
301301

302302
# process observable in a thread, handle results in aio loop
303+
thread_pool_scheduler = ThreadPoolScheduler()
303304
disposable = obs.subscribe_on(thread_pool_scheduler).subscribe(
304305
on_next=lambda i: loop.call_soon_threadsafe(queue.put_nowait, i)
305306
)

python_modules/dagster-graphql/dagster_graphql/cli.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
import click
44
import requests
5-
from graphql import graphql
6-
from graphql.execution.executors.gevent import GeventExecutor
7-
from graphql.execution.executors.sync import SyncExecutor
5+
from graphql import graphql_sync
86

97
from dagster import __version__ as dagster_version
108
from dagster import check, seven
@@ -27,26 +25,22 @@ def create_dagster_graphql_cli():
2725
return ui
2826

2927

30-
def execute_query(workspace_process_context, query, variables=None, use_sync_executor=False):
28+
def execute_query(workspace_process_context, query, variables=None):
3129
check.inst_param(
3230
workspace_process_context, "workspace_process_context", WorkspaceProcessContext
3331
)
3432
check.str_param(query, "query")
3533
check.opt_dict_param(variables, "variables")
36-
check.bool_param(use_sync_executor, "use_sync_executor")
3734

3835
query = query.strip("'\" \n\t")
3936

4037
context = workspace_process_context.create_request_context()
4138

42-
executor = SyncExecutor() if use_sync_executor else GeventExecutor()
43-
44-
result = graphql(
45-
request_string=query,
39+
result = graphql_sync(
4640
schema=create_schema(),
41+
source=query,
4742
context_value=context,
4843
variable_values=variables,
49-
executor=executor,
5044
)
5145

5246
result_dict = result.to_dict()

python_modules/dagster-graphql/dagster_graphql/implementation/execution/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22

3-
from graphql.execution.base import ResolveInfo
3+
from graphene import ResolveInfo
44
from rx import Observable
55

66
from dagster import check

python_modules/dagster-graphql/dagster_graphql/implementation/execution/launch_execution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from graphql.execution.base import ResolveInfo
1+
from graphene import ResolveInfo
22

33
from dagster import check
44
from dagster.core.storage.pipeline_run import RunsFilter

python_modules/dagster-graphql/dagster_graphql/implementation/execution/run_lifecycle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from graphql.execution.base import ResolveInfo
1+
from graphene import ResolveInfo
22

33
from dagster import check
44
from dagster.core.execution.plan.resume_retry import get_retry_steps_from_parent_run

python_modules/dagster-graphql/dagster_graphql/implementation/external.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22

3-
from graphql.execution.base import ResolveInfo
3+
from graphene import ResolveInfo
44

55
from dagster import check
66
from dagster.config.validate import validate_config_from_snap

python_modules/dagster-graphql/dagster_graphql/implementation/fetch_partition_sets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import yaml
2-
from graphql.execution.base import ResolveInfo
2+
from graphene import ResolveInfo
33

44
from dagster import check
55
from dagster.core.host_representation import (

python_modules/dagster-graphql/dagster_graphql/implementation/fetch_pipelines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from graphql.execution.base import ResolveInfo
1+
from graphene import ResolveInfo
22

33
from dagster import check
44
from dagster.core.storage.pipeline_run import PipelineRun

python_modules/dagster-graphql/dagster_graphql/implementation/fetch_runs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from collections import defaultdict
22
from typing import Dict, List
33

4-
from graphql.execution.base import ResolveInfo
4+
from graphene import ResolveInfo
55

66
from dagster import PipelineDefinition, PipelineRunStatus, check
77
from dagster.config.validate import validate_config

0 commit comments

Comments
 (0)