@tinacms/graphql 1.4.27 → 1.4.29

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.
package/dist/resolve.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import type { GraphQLConfig } from './types';
5
5
  import type { Database } from './database';
6
- export declare const resolve: ({ config, query, variables, database, silenceErrors, verbose, isAudit, }: {
6
+ export declare const resolve: ({ config, query, variables, database, silenceErrors, verbose, isAudit, ctxUser, }: {
7
7
  config?: GraphQLConfig;
8
8
  query: string;
9
9
  variables: object;
@@ -11,6 +11,9 @@ export declare const resolve: ({ config, query, variables, database, silenceErro
11
11
  silenceErrors?: boolean;
12
12
  verbose?: boolean;
13
13
  isAudit?: boolean;
14
+ ctxUser?: {
15
+ sub: string;
16
+ };
14
17
  }) => Promise<import("graphql").ExecutionResult<{
15
18
  [key: string]: any;
16
19
  }, {
@@ -55,7 +55,12 @@ export declare class Resolver {
55
55
  templates?: undefined;
56
56
  label?: string;
57
57
  name: string;
58
- path: string;
58
+ path: string; /**
59
+ * `collectionName` is passed in:
60
+ * * `addPendingDocument()` has `collection` on `args`
61
+ * * `getDocument()` provides a `collection` on `args`
62
+ * * `get<Collection>Document()` has `collection` on `lookup`
63
+ */
59
64
  indexes?: {
60
65
  name: string;
61
66
  fields: {
@@ -71,6 +76,8 @@ export declare class Resolver {
71
76
  include?: string;
72
77
  exclude?: string;
73
78
  };
79
+ isDetached?: boolean;
80
+ isAuthCollection?: boolean;
74
81
  namespace: string[];
75
82
  documents: {
76
83
  collection: Collection<true>;
@@ -81,7 +88,12 @@ export declare class Resolver {
81
88
  fields?: undefined;
82
89
  label?: string;
83
90
  name: string;
84
- path: string;
91
+ path: string; /**
92
+ * `collectionName` is passed in:
93
+ * * `addPendingDocument()` has `collection` on `args`
94
+ * * `getDocument()` provides a `collection` on `args`
95
+ * * `get<Collection>Document()` has `collection` on `lookup`
96
+ */
85
97
  indexes?: {
86
98
  name: string;
87
99
  fields: {
@@ -97,6 +109,8 @@ export declare class Resolver {
97
109
  include?: string;
98
110
  exclude?: string;
99
111
  };
112
+ isDetached?: boolean;
113
+ isAuthCollection?: boolean;
100
114
  namespace: string[];
101
115
  documents: {
102
116
  collection: Collection<true>;
@@ -162,11 +176,11 @@ export declare class Resolver {
162
176
  id: string;
163
177
  }>;
164
178
  deleteDocument: (fullPath: unknown) => Promise<void>;
165
- buildObjectMutations: (fieldValue: any, field: Collectable) => {
179
+ buildObjectMutations: (fieldValue: any, field: Collectable, existingData?: Record<string, any> | Record<string, any>[]) => Promise<{
166
180
  [key: string]: unknown;
167
181
  } | {
168
182
  [key: string]: unknown;
169
- }[];
183
+ }[]>;
170
184
  createResolveDocument: ({ collection, realPath, args, isAddPendingDocument, }: {
171
185
  collection: Collection<true>;
172
186
  realPath: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/graphql",
3
- "version": "1.4.27",
3
+ "version": "1.4.29",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "typings": "dist/index.d.ts",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@iarna/toml": "^2.2.5",
27
- "@tinacms/mdx": "1.3.20",
28
- "@tinacms/schema-tools": "1.4.13",
27
+ "@tinacms/mdx": "1.3.22",
28
+ "@tinacms/schema-tools": "1.4.14",
29
29
  "abstract-level": "^1.0.3",
30
30
  "body-parser": "^1.19.0",
31
31
  "cors": "^2.8.5",
@@ -47,6 +47,7 @@
47
47
  "micromatch": "4.0.5",
48
48
  "normalize-path": "^3.0.0",
49
49
  "readable-stream": "^4.3.0",
50
+ "scmp": "^2.1.0",
50
51
  "yup": "^0.32.9"
51
52
  },
52
53
  "publishConfig": {
@@ -57,8 +58,8 @@
57
58
  "directory": "packages/tina-graphql"
58
59
  },
59
60
  "devDependencies": {
60
- "@tinacms/schema-tools": "1.4.13",
61
- "@tinacms/scripts": "1.1.2",
61
+ "@tinacms/schema-tools": "1.4.14",
62
+ "@tinacms/scripts": "1.1.3",
62
63
  "@types/cors": "^2.8.7",
63
64
  "@types/estree": "^0.0.50",
64
65
  "@types/express": "^4.17.8",