@cedarjs/graphql-server 0.0.4

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.
Files changed (85) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -0
  3. package/dist/cors.d.ts +10 -0
  4. package/dist/cors.d.ts.map +1 -0
  5. package/dist/cors.js +70 -0
  6. package/dist/createGraphQLYoga.d.ts +6 -0
  7. package/dist/createGraphQLYoga.d.ts.map +1 -0
  8. package/dist/createGraphQLYoga.js +178 -0
  9. package/dist/directives/makeDirectives.d.ts +8 -0
  10. package/dist/directives/makeDirectives.d.ts.map +1 -0
  11. package/dist/directives/makeDirectives.js +89 -0
  12. package/dist/errors.d.ts +28 -0
  13. package/dist/errors.d.ts.map +1 -0
  14. package/dist/errors.js +98 -0
  15. package/dist/functions/graphql.d.ts +15 -0
  16. package/dist/functions/graphql.d.ts.map +1 -0
  17. package/dist/functions/graphql.js +141 -0
  18. package/dist/functions/useRequireAuth.d.ts +12 -0
  19. package/dist/functions/useRequireAuth.d.ts.map +1 -0
  20. package/dist/functions/useRequireAuth.js +70 -0
  21. package/dist/global.api-auto-imports.d.ts +5 -0
  22. package/dist/global.api-auto-imports.d.ts.map +1 -0
  23. package/dist/global.api-auto-imports.js +1 -0
  24. package/dist/globalContext.d.ts +25 -0
  25. package/dist/globalContext.d.ts.map +1 -0
  26. package/dist/globalContext.js +55 -0
  27. package/dist/globalContextStore.d.ts +9 -0
  28. package/dist/globalContextStore.d.ts.map +1 -0
  29. package/dist/globalContextStore.js +35 -0
  30. package/dist/graphiql.d.ts +8 -0
  31. package/dist/graphiql.d.ts.map +1 -0
  32. package/dist/graphiql.js +45 -0
  33. package/dist/index.d.ts +13 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +91 -0
  36. package/dist/introspection.d.ts +7 -0
  37. package/dist/introspection.d.ts.map +1 -0
  38. package/dist/introspection.js +36 -0
  39. package/dist/makeMergedSchema.d.ts +17 -0
  40. package/dist/makeMergedSchema.d.ts.map +1 -0
  41. package/dist/makeMergedSchema.js +282 -0
  42. package/dist/plugins/__fixtures__/common.d.ts +9 -0
  43. package/dist/plugins/__fixtures__/common.d.ts.map +1 -0
  44. package/dist/plugins/__fixtures__/envelop-testing.d.ts +55 -0
  45. package/dist/plugins/__fixtures__/envelop-testing.d.ts.map +1 -0
  46. package/dist/plugins/index.d.ts +10 -0
  47. package/dist/plugins/index.d.ts.map +1 -0
  48. package/dist/plugins/index.js +52 -0
  49. package/dist/plugins/useArmor.d.ts +4 -0
  50. package/dist/plugins/useArmor.d.ts.map +1 -0
  51. package/dist/plugins/useArmor.js +69 -0
  52. package/dist/plugins/useRedwoodAuthContext.d.ts +9 -0
  53. package/dist/plugins/useRedwoodAuthContext.d.ts.map +1 -0
  54. package/dist/plugins/useRedwoodAuthContext.js +61 -0
  55. package/dist/plugins/useRedwoodDirective.d.ts +83 -0
  56. package/dist/plugins/useRedwoodDirective.d.ts.map +1 -0
  57. package/dist/plugins/useRedwoodDirective.js +166 -0
  58. package/dist/plugins/useRedwoodError.d.ts +20 -0
  59. package/dist/plugins/useRedwoodError.d.ts.map +1 -0
  60. package/dist/plugins/useRedwoodError.js +63 -0
  61. package/dist/plugins/useRedwoodGlobalContextSetter.d.ts +10 -0
  62. package/dist/plugins/useRedwoodGlobalContextSetter.d.ts.map +1 -0
  63. package/dist/plugins/useRedwoodGlobalContextSetter.js +35 -0
  64. package/dist/plugins/useRedwoodLogger.d.ts +115 -0
  65. package/dist/plugins/useRedwoodLogger.d.ts.map +1 -0
  66. package/dist/plugins/useRedwoodLogger.js +149 -0
  67. package/dist/plugins/useRedwoodOpenTelemetry.d.ts +22 -0
  68. package/dist/plugins/useRedwoodOpenTelemetry.d.ts.map +1 -0
  69. package/dist/plugins/useRedwoodOpenTelemetry.js +156 -0
  70. package/dist/plugins/useRedwoodPopulateContext.d.ts +9 -0
  71. package/dist/plugins/useRedwoodPopulateContext.d.ts.map +1 -0
  72. package/dist/plugins/useRedwoodPopulateContext.js +35 -0
  73. package/dist/plugins/useRedwoodTrustedDocuments.d.ts +23 -0
  74. package/dist/plugins/useRedwoodTrustedDocuments.d.ts.map +1 -0
  75. package/dist/plugins/useRedwoodTrustedDocuments.js +67 -0
  76. package/dist/rootSchema.d.ts +25 -0
  77. package/dist/rootSchema.d.ts.map +1 -0
  78. package/dist/rootSchema.js +98 -0
  79. package/dist/subscriptions/makeSubscriptions.d.ts +18 -0
  80. package/dist/subscriptions/makeSubscriptions.d.ts.map +1 -0
  81. package/dist/subscriptions/makeSubscriptions.js +40 -0
  82. package/dist/types.d.ts +215 -0
  83. package/dist/types.d.ts.map +1 -0
  84. package/dist/types.js +16 -0
  85. package/package.json +69 -0
@@ -0,0 +1,215 @@
1
+ import type { AllowedOperations } from '@envelop/filter-operation-type';
2
+ import type { GraphQLArmorConfig } from '@escape.tech/graphql-armor-types';
3
+ import type { IExecutableSchemaDefinition } from '@graphql-tools/schema';
4
+ import type { APIGatewayProxyEvent, Context as LambdaContext } from 'aws-lambda';
5
+ import type { GraphQLObjectType, GraphQLInterfaceType, DocumentNode } from 'graphql';
6
+ import type { Plugin } from 'graphql-yoga';
7
+ import type { AuthContextPayload, Decoder } from '@cedarjs/api';
8
+ import type { CorsConfig } from '@cedarjs/api';
9
+ import type { RedwoodRealtimeOptions } from '@cedarjs/realtime';
10
+ import type { DirectiveGlobImports } from './directives/makeDirectives';
11
+ import type { useRedwoodDirectiveReturn, DirectivePluginOptions } from './plugins/useRedwoodDirective';
12
+ import type { LoggerConfig } from './plugins/useRedwoodLogger';
13
+ import type { RedwoodTrustedDocumentOptions } from './plugins/useRedwoodTrustedDocuments';
14
+ export type Resolver = (...args: unknown[]) => unknown;
15
+ export type Services = {
16
+ [funcName: string]: Resolver;
17
+ };
18
+ type ThenArg<T> = T extends PromiseLike<infer U> ? U : T;
19
+ export type ResolverArgs<TRoot> = {
20
+ root: ThenArg<TRoot>;
21
+ };
22
+ export type SdlGlobImports = {
23
+ [key: string]: {
24
+ schema: DocumentNode;
25
+ resolvers: Record<string, unknown>;
26
+ };
27
+ };
28
+ export type ServicesGlobImports = {
29
+ [serviceName: string]: Services;
30
+ };
31
+ export interface MakeServicesInterface {
32
+ services: ServicesGlobImports;
33
+ }
34
+ export type MakeServices = (args: MakeServicesInterface) => ServicesGlobImports;
35
+ export type GraphQLTypeWithFields = GraphQLObjectType | GraphQLInterfaceType;
36
+ export type { useRedwoodDirectiveReturn, DirectivePluginOptions };
37
+ export type GetCurrentUser = (decoded: AuthContextPayload[0], raw: AuthContextPayload[1], req?: AuthContextPayload[2]) => Promise<null | Record<string, unknown>>;
38
+ export type GenerateGraphiQLHeader = () => string;
39
+ export type Context = Record<string, unknown>;
40
+ export type ContextFunction = (...args: any[]) => Context | Promise<Context>;
41
+ export type ArmorConfig = {
42
+ logContext?: boolean;
43
+ logErrors?: boolean;
44
+ } & GraphQLArmorConfig;
45
+ /** This is an interface so you can extend it inside your application when needed */
46
+ export interface RedwoodGraphQLContext {
47
+ event: APIGatewayProxyEvent;
48
+ requestContext: LambdaContext;
49
+ currentUser?: ThenArg<ReturnType<GetCurrentUser>> | AuthContextPayload | null;
50
+ [index: string]: unknown;
51
+ }
52
+ export interface RedwoodOpenTelemetryConfig {
53
+ /**
54
+ * @description Enables the creation of a span for each resolver execution.
55
+ */
56
+ resolvers: boolean;
57
+ /**
58
+ * @description Includes the execution result in the span attributes.
59
+ */
60
+ variables: boolean;
61
+ /**
62
+ * @description Includes the variables in the span attributes.
63
+ */
64
+ result: boolean;
65
+ }
66
+ export interface RedwoodScalarConfig {
67
+ File?: boolean;
68
+ }
69
+ /**
70
+ * GraphQLYogaOptions
71
+ */
72
+ export type GraphQLYogaOptions = {
73
+ /**
74
+ * @description The identifier used in the GraphQL health check response.
75
+ * It verifies readiness when sent as a header in the readiness check request.
76
+ *
77
+ * By default, the identifier is `yoga` as seen in the HTTP response header `x-yoga-id: yoga`
78
+ */
79
+ healthCheckId?: string;
80
+ /**
81
+ * @description Customize GraphQL Logger
82
+ *
83
+ * Collect resolver timings, and exposes trace data for
84
+ * an individual request under extensions as part of the GraphQL response.
85
+ */
86
+ loggerConfig: LoggerConfig;
87
+ /**
88
+ * @description Modify the resolver and global context.
89
+ */
90
+ context?: Context | ContextFunction;
91
+ /**
92
+ * @description An async function that maps the auth token retrieved from the
93
+ * request headers to an object.
94
+ * Is it executed when the `auth-provider` contains one of the supported
95
+ * providers.
96
+ */
97
+ getCurrentUser?: GetCurrentUser;
98
+ /**
99
+ * @description A callback when an unhandled exception occurs. Use this to disconnect your prisma instance.
100
+ */
101
+ onException?: () => void;
102
+ /**
103
+ * @description Services passed from the glob import:
104
+ * import services from 'src/services\/**\/*.{js,ts}'
105
+ */
106
+ services: ServicesGlobImports;
107
+ /**
108
+ * @description SDLs (schema definitions) passed from the glob import:
109
+ * import sdls from 'src/graphql\/**\/*.{js,ts}'
110
+ */
111
+ sdls: SdlGlobImports;
112
+ /**
113
+ * @description Directives passed from the glob import:
114
+ * import directives from 'src/directives/**\/*.{js,ts}'
115
+ */
116
+ directives?: DirectiveGlobImports;
117
+ /**
118
+ * @description A list of options passed to [makeExecutableSchema]
119
+ * (https://www.graphql-tools.com/docs/generate-schema/#makeexecutableschemaoptions).
120
+ */
121
+ schemaOptions?: Partial<IExecutableSchemaDefinition>;
122
+ /**
123
+ * @description CORS configuration
124
+ */
125
+ cors?: CorsConfig;
126
+ /**
127
+ * @description Customize GraphQL Armor plugin configuration
128
+ *
129
+ * @see https://escape-technologies.github.io/graphql-armor/docs/configuration/examples
130
+ */
131
+ armorConfig?: ArmorConfig;
132
+ /**
133
+ * @description Customize the default error message used to mask errors.
134
+ *
135
+ * By default, the masked error message is "Something went wrong"
136
+ *
137
+ * @see https://github.com/dotansimha/envelop/blob/main/packages/core/docs/use-masked-errors.md
138
+ */
139
+ defaultError?: string;
140
+ /**
141
+ * @description Only allows the specified operation types (e.g. subscription, query or mutation).
142
+ *
143
+ * By default, only allow query and mutation (ie, do not allow subscriptions).
144
+ *
145
+ * An array of GraphQL's OperationTypeNode enums:
146
+ * - OperationTypeNode.SUBSCRIPTION
147
+ * - OperationTypeNode.QUERY
148
+ * - OperationTypeNode.MUTATION
149
+ *
150
+ * @see https://github.com/dotansimha/envelop/tree/main/packages/plugins/filter-operation-type
151
+ */
152
+ allowedOperations?: AllowedOperations;
153
+ /**
154
+ * @description Custom Envelop plugins
155
+ */
156
+ extraPlugins?: Plugin[];
157
+ /**
158
+ * @description Auth-provider specific token decoder
159
+ */
160
+ authDecoder?: Decoder | Decoder[];
161
+ /**
162
+ * @description Customize the GraphiQL Endpoint that appears in the location bar of the GraphQL Playground
163
+ *
164
+ * Defaults to '/graphql' as this value must match the name of the `graphql` function on the api-side.
165
+ */
166
+ graphiQLEndpoint?: string;
167
+ /**
168
+ * @description Allow GraphiQL playground.
169
+ * By default, GraphiQL playground is disabled in production. Explicitly set this to true or false to override in all environments.
170
+ */
171
+ allowGraphiQL?: boolean;
172
+ /**
173
+ * @description Allow schema introspection.
174
+ * By default, schema introspection is disabled in production. Explicitly set this to true or false to override in all environments.
175
+ */
176
+ allowIntrospection?: boolean;
177
+ /**
178
+ * @description Function that returns custom headers (as string) for GraphiQL.
179
+ *
180
+ * Headers must set auth-provider, Authorization and (if using dbAuth) the encrypted cookie.
181
+ */
182
+ generateGraphiQLHeader?: GenerateGraphiQLHeader;
183
+ /**
184
+ * @description Configure RedwoodRealtime plugin with subscriptions and live queries
185
+ *
186
+ * Only supported in a server deploy and not allowed with GraphQLHandler config
187
+ */
188
+ realtime?: RedwoodRealtimeOptions;
189
+ /**
190
+ * @description Configure Trusted Documents options
191
+ *
192
+ * @see https://benjie.dev/graphql/trusted-documents
193
+ * @see https://the-guild.dev/graphql/yoga-server/docs/features/persisted-operations
194
+ */
195
+ trustedDocuments?: RedwoodTrustedDocumentOptions;
196
+ /**
197
+ * @description Configure OpenTelemetry plugin behaviour
198
+ */
199
+ openTelemetryOptions?: RedwoodOpenTelemetryConfig;
200
+ /**
201
+ * @description Configure which scalars to include in the schema. This should match your
202
+ * `graphql.includeScalars` configuration in `redwood.toml`.
203
+ *
204
+ * The default is to include. You must set to `false` to exclude.
205
+ */
206
+ includeScalars?: RedwoodScalarConfig;
207
+ };
208
+ /**
209
+ * @description Configure GraphQLHandler with options
210
+ *
211
+ * Note: RedwoodRealtime is not supported
212
+ */
213
+ export type GraphQLHandlerOptions = GraphQLYogaOptions;
214
+ export type GraphiQLOptions = Pick<GraphQLYogaOptions, 'allowGraphiQL' | 'generateGraphiQLHeader'>;
215
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,YAAY,CAAA;AAChF,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACb,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAE/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,E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cAAc,CAAA;IAEpB;;;OAGG;IACH,UAAU,CAAC,EAAE,oBAAoB,CAAA;IAEjC;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAA;IAEpD;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IAEjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAA;IAEzB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IAErC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IAEvB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;IAEjC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;IAE/C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAA;IAEjC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,6BAA6B,CAAA;IAEhD;;OAEG;IACH,oBAAoB,CAAC,EAAE,0BAA0B,CAAA;IAEjD;;;;;OAKG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAA;CACrC,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAA;AAEtD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,kBAAkB,EAClB,eAAe,GAAG,wBAAwB,CAC3C,CAAA"}
package/dist/types.js ADDED
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var types_exports = {};
16
+ module.exports = __toCommonJS(types_exports);
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@cedarjs/graphql-server",
3
+ "version": "0.0.4",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/cedarjs/cedar.git",
7
+ "directory": "packages/graphql-server"
8
+ },
9
+ "license": "MIT",
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "scripts": {
16
+ "build": "tsx ./build.mts && yarn build:types",
17
+ "build:pack": "yarn pack -o cedar-graphql-server.tgz",
18
+ "build:types": "tsc --build --verbose ./tsconfig.json",
19
+ "build:watch": "nodemon --watch src --ext \"js,jsx,ts,tsx\" --ignore dist --exec \"yarn build\"",
20
+ "prepublishOnly": "NODE_ENV=production yarn build",
21
+ "test": "yarn vitest run src/",
22
+ "test:watch": "yarn test --watch"
23
+ },
24
+ "dependencies": {
25
+ "@babel/runtime-corejs3": "7.26.10",
26
+ "@cedarjs/api": "0.0.4",
27
+ "@cedarjs/context": "0.0.4",
28
+ "@envelop/core": "5.0.2",
29
+ "@envelop/depth-limit": "4.0.0",
30
+ "@envelop/disable-introspection": "6.0.0",
31
+ "@envelop/filter-operation-type": "6.0.0",
32
+ "@envelop/on-resolve": "4.1.1",
33
+ "@escape.tech/graphql-armor": "3.0.1",
34
+ "@graphql-tools/merge": "9.0.7",
35
+ "@graphql-tools/schema": "10.0.6",
36
+ "@graphql-tools/utils": "10.5.4",
37
+ "@graphql-yoga/plugin-persisted-operations": "3.7.0",
38
+ "@opentelemetry/api": "1.8.0",
39
+ "core-js": "3.42.0",
40
+ "graphql": "16.9.0",
41
+ "graphql-scalars": "1.23.0",
42
+ "graphql-tag": "2.12.6",
43
+ "graphql-yoga": "5.7.0",
44
+ "lodash": "4.17.21",
45
+ "uuid": "10.0.0"
46
+ },
47
+ "devDependencies": {
48
+ "@babel/cli": "7.26.4",
49
+ "@babel/core": "^7.26.10",
50
+ "@cedarjs/framework-tools": "0.0.4",
51
+ "@cedarjs/project-config": "0.0.4",
52
+ "@cedarjs/realtime": "0.0.4",
53
+ "@envelop/types": "5.0.0",
54
+ "@types/aws-lambda": "8.10.145",
55
+ "@types/jsonwebtoken": "9.0.8",
56
+ "@types/lodash": "4.17.15",
57
+ "@types/uuid": "10.0.0",
58
+ "@whatwg-node/fetch": "0.9.21",
59
+ "@whatwg-node/promise-helpers": "^1.3.0",
60
+ "jsonwebtoken": "9.0.2",
61
+ "tsx": "4.19.3",
62
+ "typescript": "5.6.2",
63
+ "vitest": "2.1.9"
64
+ },
65
+ "publishConfig": {
66
+ "access": "public"
67
+ },
68
+ "gitHead": "5b4f77f985bd86ee31ee7338312627accf0cb85b"
69
+ }