History

Refactor scope config boundary

Rhys Sullivan committed 7 months ago

Commit 2d004cd1 parent 3f52c6036 files · +1834 −360Browse files

Showing the changes to plugins/graphql (1 of 36 files). Show all

Unified · Split

plugins/graphql/sdk/index.ts+7−7
@@ -12,7 +12,7 @@ import { · 11 unmodified lines
12 createSourceCatalogSyncResult,12 createSourceCatalogSyncResult,
13} from "@executor/source-core";13} from "@executor/source-core";
14import type {14import type {
15 LocalExecutorConfig,15 ExecutorScopeConfig,
16 Source,16 Source,
17} from "@executor/platform-sdk/schema";17} from "@executor/platform-sdk/schema";
18import {18import {
@@ -23,8 +23,8 @@ import { · 4 unmodified lines
23} from "@executor/platform-sdk/plugins";23} from "@executor/platform-sdk/plugins";
24import {24import {
25 SecretMaterialResolverService,25 SecretMaterialResolverService,
26 createPluginLocalConfigEntrySchema,26 createPluginScopeConfigEntrySchema,
27 pluginLocalConfigSourceFromConfig,27 pluginScopeConfigSourceFromConfig,
28 provideExecutorRuntime,28 provideExecutorRuntime,
29 runtimeEffectError,29 runtimeEffectError,
30} from "@executor/platform-sdk/runtime";30} from "@executor/platform-sdk/runtime";
@@ -151,7 +151,7 @@ const asStringRecord = (value: unknown): Record<string, string> => · 120 unmodified lines
151 );151 );
152 152
153const decodeGraphqlCurrentLocalConfigOption = Schema.decodeUnknownOption(153const decodeGraphqlCurrentLocalConfigOption = Schema.decodeUnknownOption(
154 createPluginLocalConfigEntrySchema({154 createPluginScopeConfigEntrySchema({
155 kind: "graphql",155 kind: "graphql",
156 config: GraphqlStoredSourceDataSchema,156 config: GraphqlStoredSourceDataSchema,
157 }),157 }),
@@ -336,7 +336,7 @@ const graphqlConnectInputFromAddInput = ( · 178 unmodified lines
336 336
337const graphqlStoredSourceDataFromLocalConfig = (input: {337const graphqlStoredSourceDataFromLocalConfig = (input: {
338 config: unknown;338 config: unknown;
339 loadedConfig: LocalExecutorConfig | null;339 loadedConfig: ExecutorScopeConfig | null;
340}): GraphqlStoredSourceData => {340}): GraphqlStoredSourceData => {
341 const current = decodeGraphqlCurrentLocalConfigOption(input.config);341 const current = decodeGraphqlCurrentLocalConfigOption(input.config);
342 if (Option.isSome(current)) {342 if (Option.isSome(current)) {
@@ -397,9 +397,9 @@ export const graphqlSdkPlugin = (options: { · 54 unmodified lines
397 toConfig: ({ source, stored }) =>397 toConfig: ({ source, stored }) =>
398 sourceConfigFromStored(source, normalizeStoredSourceData(stored)),398 sourceConfigFromStored(source, normalizeStoredSourceData(stored)),
399 },399 },
400 localConfig: {400 scopeConfig: {
401 toConfigSource: ({ source, stored }) =>401 toConfigSource: ({ source, stored }) =>
402 pluginLocalConfigSourceFromConfig({402 pluginScopeConfigSourceFromConfig({
403 source,403 source,
404 config: normalizeStoredSourceData(stored),404 config: normalizeStoredSourceData(stored),
405 }),405 }),

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t