@cedarjs/graphql-server 5.0.0-canary.2385 → 5.0.0-canary.2386

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.
@@ -22,17 +22,17 @@ __export(useRedwoodTrustedDocuments_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(useRedwoodTrustedDocuments_exports);
24
24
  var import_plugin_persisted_operations = require("@graphql-yoga/plugin-persisted-operations");
25
- const REDWOOD__AUTH_GET_CURRENT_USER_QUERY = '{"query":"query __REDWOOD__AUTH_GET_CURRENT_USER { redwood { currentUser } }"}';
25
+ const CEDAR__AUTH_GET_CURRENT_USER_QUERY = '{"query":"query __CEDAR__AUTH_GET_CURRENT_USER { cedar { currentUser } }"}';
26
26
  const CEDAR__STUDIO_RESYNC_MAIL_RENDERERS_MUTATION = '{"query":"mutation { resyncMailRenderers }"}';
27
27
  const CEDAR__STUDIO_TEMPLATE_MUTATION = '{"query":"mutation { resyncMailTemplate }"}';
28
- const allowRedwoodAuthCurrentUserQuery = async (request) => {
28
+ const allowCedarAuthCurrentUserQuery = async (request) => {
29
29
  const headers = request.headers;
30
30
  const hasContentType = headers.get("content-type") === "application/json";
31
31
  const hasAuthProvider = !!headers.get("auth-provider");
32
32
  const hasAuthorization = !!headers.get("authorization");
33
33
  const hasAllowedHeaders = hasContentType && hasAuthProvider && hasAuthorization;
34
34
  const query = await request.text();
35
- const hasAllowedQuery = query === REDWOOD__AUTH_GET_CURRENT_USER_QUERY;
35
+ const hasAllowedQuery = query === CEDAR__AUTH_GET_CURRENT_USER_QUERY;
36
36
  return hasAllowedHeaders && hasAllowedQuery;
37
37
  };
38
38
  const allowCedarStudioResyncMailMutations = async (request) => {
@@ -70,7 +70,7 @@ const useRedwoodTrustedDocuments = (options) => {
70
70
  }
71
71
  }
72
72
  }
73
- return allowRedwoodAuthCurrentUserQuery(request) || allowCedarStudioResyncMailMutations(request);
73
+ return allowCedarAuthCurrentUserQuery(request) || allowCedarStudioResyncMailMutations(request);
74
74
  }
75
75
  });
76
76
  };
@@ -1,15 +1,15 @@
1
1
  import { usePersistedOperations } from "@graphql-yoga/plugin-persisted-operations";
2
- const REDWOOD__AUTH_GET_CURRENT_USER_QUERY = '{"query":"query __REDWOOD__AUTH_GET_CURRENT_USER { redwood { currentUser } }"}';
2
+ const CEDAR__AUTH_GET_CURRENT_USER_QUERY = '{"query":"query __CEDAR__AUTH_GET_CURRENT_USER { cedar { currentUser } }"}';
3
3
  const CEDAR__STUDIO_RESYNC_MAIL_RENDERERS_MUTATION = '{"query":"mutation { resyncMailRenderers }"}';
4
4
  const CEDAR__STUDIO_TEMPLATE_MUTATION = '{"query":"mutation { resyncMailTemplate }"}';
5
- const allowRedwoodAuthCurrentUserQuery = async (request) => {
5
+ const allowCedarAuthCurrentUserQuery = async (request) => {
6
6
  const headers = request.headers;
7
7
  const hasContentType = headers.get("content-type") === "application/json";
8
8
  const hasAuthProvider = !!headers.get("auth-provider");
9
9
  const hasAuthorization = !!headers.get("authorization");
10
10
  const hasAllowedHeaders = hasContentType && hasAuthProvider && hasAuthorization;
11
11
  const query = await request.text();
12
- const hasAllowedQuery = query === REDWOOD__AUTH_GET_CURRENT_USER_QUERY;
12
+ const hasAllowedQuery = query === CEDAR__AUTH_GET_CURRENT_USER_QUERY;
13
13
  return hasAllowedHeaders && hasAllowedQuery;
14
14
  };
15
15
  const allowCedarStudioResyncMailMutations = async (request) => {
@@ -47,7 +47,7 @@ const useRedwoodTrustedDocuments = (options) => {
47
47
  }
48
48
  }
49
49
  }
50
- return allowRedwoodAuthCurrentUserQuery(request) || allowCedarStudioResyncMailMutations(request);
50
+ return allowCedarAuthCurrentUserQuery(request) || allowCedarStudioResyncMailMutations(request);
51
51
  }
52
52
  });
53
53
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/graphql-server",
3
- "version": "5.0.0-canary.2385",
3
+ "version": "5.0.0-canary.2386",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -37,8 +37,8 @@
37
37
  "test:watch": "yarn test --watch"
38
38
  },
39
39
  "dependencies": {
40
- "@cedarjs/api": "5.0.0-canary.2385",
41
- "@cedarjs/context": "5.0.0-canary.2385",
40
+ "@cedarjs/api": "5.0.0-canary.2386",
41
+ "@cedarjs/context": "5.0.0-canary.2386",
42
42
  "@envelop/core": "5.5.1",
43
43
  "@envelop/depth-limit": "4.0.0",
44
44
  "@envelop/disable-introspection": "6.0.0",
@@ -61,9 +61,9 @@
61
61
  "devDependencies": {
62
62
  "@babel/cli": "7.28.6",
63
63
  "@babel/core": "^7.26.10",
64
- "@cedarjs/framework-tools": "5.0.0-canary.2385",
65
- "@cedarjs/project-config": "5.0.0-canary.2385",
66
- "@cedarjs/realtime": "5.0.0-canary.2385",
64
+ "@cedarjs/framework-tools": "5.0.0-canary.2386",
65
+ "@cedarjs/project-config": "5.0.0-canary.2386",
66
+ "@cedarjs/realtime": "5.0.0-canary.2386",
67
67
  "@envelop/types": "5.2.1",
68
68
  "@types/aws-lambda": "8.10.161",
69
69
  "@types/jsonwebtoken": "9.0.10",