@executor-js/plugin-graphql 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,172 +1,83 @@
1
1
  import { Schema } from "effect";
2
- export declare const GraphqlOperationKind: Schema.Literal<["query", "mutation"]>;
2
+ export declare const GraphqlOperationKind: Schema.Literals<readonly ["query", "mutation"]>;
3
3
  export type GraphqlOperationKind = typeof GraphqlOperationKind.Type;
4
- declare const GraphqlArgument_base: Schema.Class<GraphqlArgument, {
5
- name: typeof Schema.String;
6
- typeName: typeof Schema.String;
7
- required: typeof Schema.Boolean;
8
- description: Schema.optionalWith<typeof Schema.String, {
9
- as: "Option";
10
- }>;
11
- }, Schema.Struct.Encoded<{
12
- name: typeof Schema.String;
13
- typeName: typeof Schema.String;
14
- required: typeof Schema.Boolean;
15
- description: Schema.optionalWith<typeof Schema.String, {
16
- as: "Option";
17
- }>;
18
- }>, never, {
19
- readonly name: string;
20
- } & {
21
- readonly description: import("effect/Option").Option<string>;
22
- } & {
23
- readonly required: boolean;
24
- } & {
25
- readonly typeName: string;
26
- }, {}, {}>;
4
+ declare const GraphqlArgument_base: Schema.Class<GraphqlArgument, Schema.Struct<{
5
+ readonly name: Schema.String;
6
+ readonly typeName: Schema.String;
7
+ readonly required: Schema.Boolean;
8
+ readonly description: Schema.OptionFromOptional<Schema.String>;
9
+ }>, {}>;
27
10
  export declare class GraphqlArgument extends GraphqlArgument_base {
28
11
  }
29
- declare const ExtractedField_base: Schema.Class<ExtractedField, {
12
+ declare const ExtractedField_base: Schema.Class<ExtractedField, Schema.Struct<{
30
13
  /** e.g. "user", "createUser" */
31
- fieldName: typeof Schema.String;
14
+ readonly fieldName: Schema.String;
32
15
  /** "query" or "mutation" */
33
- kind: Schema.Literal<["query", "mutation"]>;
34
- description: Schema.optionalWith<typeof Schema.String, {
35
- as: "Option";
36
- }>;
37
- arguments: Schema.Array$<typeof GraphqlArgument>;
16
+ readonly kind: Schema.Literals<readonly ["query", "mutation"]>;
17
+ readonly description: Schema.OptionFromOptional<Schema.String>;
18
+ readonly arguments: Schema.$Array<typeof GraphqlArgument>;
38
19
  /** JSON Schema for the input (built from arguments) */
39
- inputSchema: Schema.optionalWith<typeof Schema.Unknown, {
40
- as: "Option";
41
- }>;
20
+ readonly inputSchema: Schema.OptionFromOptional<Schema.Unknown>;
42
21
  /** The return type name for documentation */
43
- returnTypeName: typeof Schema.String;
44
- }, Schema.Struct.Encoded<{
45
- /** e.g. "user", "createUser" */
46
- fieldName: typeof Schema.String;
47
- /** "query" or "mutation" */
48
- kind: Schema.Literal<["query", "mutation"]>;
49
- description: Schema.optionalWith<typeof Schema.String, {
50
- as: "Option";
51
- }>;
52
- arguments: Schema.Array$<typeof GraphqlArgument>;
53
- /** JSON Schema for the input (built from arguments) */
54
- inputSchema: Schema.optionalWith<typeof Schema.Unknown, {
55
- as: "Option";
56
- }>;
57
- /** The return type name for documentation */
58
- returnTypeName: typeof Schema.String;
59
- }>, never, {
60
- readonly description: import("effect/Option").Option<string>;
61
- } & {
62
- readonly inputSchema: import("effect/Option").Option<unknown>;
63
- } & {
64
- readonly kind: "query" | "mutation";
65
- } & {
66
- readonly fieldName: string;
67
- } & {
68
- readonly returnTypeName: string;
69
- } & {
70
- readonly arguments: readonly GraphqlArgument[];
71
- }, {}, {}>;
22
+ readonly returnTypeName: Schema.String;
23
+ }>, {}>;
72
24
  export declare class ExtractedField extends ExtractedField_base {
73
25
  }
74
- declare const ExtractionResult_base: Schema.Class<ExtractionResult, {
75
- /** Schema name from introspection */
76
- schemaName: Schema.optionalWith<typeof Schema.String, {
77
- as: "Option";
78
- }>;
79
- fields: Schema.Array$<typeof ExtractedField>;
80
- }, Schema.Struct.Encoded<{
26
+ declare const ExtractionResult_base: Schema.Class<ExtractionResult, Schema.Struct<{
81
27
  /** Schema name from introspection */
82
- schemaName: Schema.optionalWith<typeof Schema.String, {
83
- as: "Option";
84
- }>;
85
- fields: Schema.Array$<typeof ExtractedField>;
86
- }>, never, {
87
- readonly fields: readonly ExtractedField[];
88
- } & {
89
- readonly schemaName: import("effect/Option").Option<string>;
90
- }, {}, {}>;
28
+ readonly schemaName: Schema.OptionFromOptional<Schema.String>;
29
+ readonly fields: Schema.$Array<typeof ExtractedField>;
30
+ }>, {}>;
91
31
  export declare class ExtractionResult extends ExtractionResult_base {
92
32
  }
93
- declare const OperationBinding_base: Schema.Class<OperationBinding, {
94
- kind: Schema.Literal<["query", "mutation"]>;
95
- fieldName: typeof Schema.String;
33
+ declare const OperationBinding_base: Schema.Class<OperationBinding, Schema.Struct<{
34
+ readonly kind: Schema.Literals<readonly ["query", "mutation"]>;
35
+ readonly fieldName: Schema.String;
96
36
  /** The full GraphQL query/mutation string */
97
- operationString: typeof Schema.String;
37
+ readonly operationString: Schema.String;
98
38
  /** Ordered variable names for mapping */
99
- variableNames: Schema.Array$<typeof Schema.String>;
100
- }, Schema.Struct.Encoded<{
101
- kind: Schema.Literal<["query", "mutation"]>;
102
- fieldName: typeof Schema.String;
103
- /** The full GraphQL query/mutation string */
104
- operationString: typeof Schema.String;
105
- /** Ordered variable names for mapping */
106
- variableNames: Schema.Array$<typeof Schema.String>;
107
- }>, never, {
108
- readonly kind: "query" | "mutation";
109
- } & {
110
- readonly fieldName: string;
111
- } & {
112
- readonly operationString: string;
113
- } & {
114
- readonly variableNames: readonly string[];
115
- }, {}, {}>;
39
+ readonly variableNames: Schema.$Array<Schema.String>;
40
+ }>, {}>;
116
41
  export declare class OperationBinding extends OperationBinding_base {
117
42
  }
118
- export declare const HeaderValue: Schema.Union<[typeof Schema.String, Schema.Struct<{
119
- secretId: typeof Schema.String;
120
- prefix: Schema.optional<typeof Schema.String>;
43
+ export declare const HeaderValue: Schema.Union<readonly [Schema.String, Schema.Struct<{
44
+ readonly secretId: Schema.String;
45
+ readonly prefix: Schema.optional<Schema.String>;
121
46
  }>]>;
122
47
  export type HeaderValue = typeof HeaderValue.Type;
123
- declare const InvocationConfig_base: Schema.Class<InvocationConfig, {
124
- /** The GraphQL endpoint URL */
125
- endpoint: typeof Schema.String;
126
- /** Headers applied to every request. Values can reference secrets. */
127
- headers: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.Struct<{
128
- secretId: typeof Schema.String;
129
- prefix: Schema.optional<typeof Schema.String>;
130
- }>]>>, {
131
- default: () => {};
132
- }>;
133
- }, Schema.Struct.Encoded<{
48
+ export declare const QueryParamValue: Schema.Union<readonly [Schema.String, Schema.Struct<{
49
+ readonly secretId: Schema.String;
50
+ readonly prefix: Schema.optional<Schema.String>;
51
+ }>]>;
52
+ export type QueryParamValue = typeof QueryParamValue.Type;
53
+ export declare const GraphqlSourceAuth: Schema.Union<readonly [Schema.Struct<{
54
+ readonly kind: Schema.Literal<"none">;
55
+ }>, Schema.Struct<{
56
+ readonly kind: Schema.Literal<"oauth2">;
57
+ readonly connectionId: Schema.String;
58
+ }>]>;
59
+ export type GraphqlSourceAuth = typeof GraphqlSourceAuth.Type;
60
+ declare const InvocationConfig_base: Schema.Class<InvocationConfig, Schema.Struct<{
134
61
  /** The GraphQL endpoint URL */
135
- endpoint: typeof Schema.String;
62
+ readonly endpoint: Schema.String;
136
63
  /** Headers applied to every request. Values can reference secrets. */
137
- headers: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.Struct<{
138
- secretId: typeof Schema.String;
139
- prefix: Schema.optional<typeof Schema.String>;
140
- }>]>>, {
141
- default: () => {};
142
- }>;
143
- }>, never, {
144
- readonly endpoint: string;
145
- } & {
146
- readonly headers?: {
147
- readonly [x: string]: string | {
148
- readonly secretId: string;
149
- readonly prefix?: string | undefined;
150
- };
151
- } | undefined;
152
- }, {}, {}>;
64
+ readonly headers: Schema.withConstructorDefault<Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
65
+ readonly secretId: Schema.String;
66
+ readonly prefix: Schema.optional<Schema.String>;
67
+ }>]>>>>;
68
+ /** Query parameters applied to every request. Values can reference secrets. */
69
+ readonly queryParams: Schema.withConstructorDefault<Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
70
+ readonly secretId: Schema.String;
71
+ readonly prefix: Schema.optional<Schema.String>;
72
+ }>]>>>>;
73
+ }>, {}>;
153
74
  export declare class InvocationConfig extends InvocationConfig_base {
154
75
  }
155
- declare const InvocationResult_base: Schema.Class<InvocationResult, {
156
- status: typeof Schema.Number;
157
- data: Schema.NullOr<typeof Schema.Unknown>;
158
- errors: Schema.NullOr<typeof Schema.Unknown>;
159
- }, Schema.Struct.Encoded<{
160
- status: typeof Schema.Number;
161
- data: Schema.NullOr<typeof Schema.Unknown>;
162
- errors: Schema.NullOr<typeof Schema.Unknown>;
163
- }>, never, {
164
- readonly data: unknown;
165
- } & {
166
- readonly status: number;
167
- } & {
168
- readonly errors: unknown;
169
- }, {}, {}>;
76
+ declare const InvocationResult_base: Schema.Class<InvocationResult, Schema.Struct<{
77
+ readonly status: Schema.Number;
78
+ readonly data: Schema.NullOr<Schema.Unknown>;
79
+ readonly errors: Schema.NullOr<Schema.Unknown>;
80
+ }>, {}>;
170
81
  export declare class InvocationResult extends InvocationResult_base {
171
82
  }
172
83
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@executor-js/plugin-graphql",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/graphql",
5
5
  "bugs": {
6
6
  "url": "https://github.com/RhysSullivan/executor/issues"
@@ -40,28 +40,23 @@
40
40
  "typecheck:slow": "bunx tsc --noEmit -p tsconfig.json"
41
41
  },
42
42
  "dependencies": {
43
- "@effect/platform": "^0.96.0",
44
- "@effect/platform-node": "^0.106.0",
45
- "@executor/config": "1.4.3",
46
- "@executor-js/sdk": "0.0.1",
47
- "effect": "^3.21.0"
43
+ "@effect/platform-node": "4.0.0-beta.59",
44
+ "@executor-js/config": "0.1.0",
45
+ "@executor-js/sdk": "0.1.0",
46
+ "effect": "4.0.0-beta.59"
48
47
  },
49
48
  "devDependencies": {
50
- "@effect-atom/atom-react": "^0.5.0",
51
- "@effect/vitest": "^0.29.0",
52
- "@executor/api": "1.4.3",
53
- "@executor/react": "1.4.3",
49
+ "@effect/atom-react": "4.0.0-beta.59",
50
+ "@effect/vitest": "4.0.0-beta.59",
54
51
  "@types/node": "^24.3.1",
55
52
  "@types/react": "^19.1.0",
56
53
  "bun-types": "^1.2.22",
57
54
  "react": "^19.1.0",
58
55
  "tsup": "^8.5.0",
59
- "vitest": "^4.1.3"
56
+ "vitest": "^4.1.5"
60
57
  },
61
58
  "peerDependencies": {
62
- "@effect-atom/atom-react": "^0.5.0",
63
- "@executor/api": "1.4.3",
64
- "@executor/react": "1.4.3",
59
+ "@effect/atom-react": "4.0.0-beta.59",
65
60
  "@tanstack/react-router": "^1.168.10",
66
61
  "react": "^19.1.0"
67
62
  },
@@ -69,17 +64,11 @@
69
64
  "react": {
70
65
  "optional": true
71
66
  },
72
- "@effect-atom/atom-react": {
67
+ "@effect/atom-react": {
73
68
  "optional": true
74
69
  },
75
70
  "@tanstack/react-router": {
76
71
  "optional": true
77
- },
78
- "@executor/api": {
79
- "optional": true
80
- },
81
- "@executor/react": {
82
- "optional": true
83
72
  }
84
73
  }
85
74
  }