Skip to content

Commit 0905e22

Browse files
committed
chore: unpin graphql-core
1 parent 2e6eabd commit 0905e22

File tree

21 files changed

+32
-42
lines changed

21 files changed

+32
-42
lines changed

js_modules/dagit/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ deps =
1010
-e ../../python_modules/dagster[test]
1111
-e ../../python_modules/dagster-graphql
1212
-e ../../python_modules/libraries/dagster-slack
13-
-e ../../python_modules/dagit[starlette]
13+
-e ../../python_modules/dagit
1414
usedevelop = False
1515
whitelist_externals =
1616
/bin/bash

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/dagit/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ deps =
88
objgraph
99
-e ../dagster[test]
1010
-e ../dagster-graphql
11-
-e .[starlette]
11+
-e .
1212

1313
usedevelop = true
1414
whitelist_externals =

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 (

0 commit comments

Comments
 (0)