@cedarjs/web 1.0.0-canary.13000 → 1.0.0-canary.13002

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.
@@ -244,12 +244,19 @@ var QueryDocumentKeys = {
244
244
  Name: [],
245
245
  Document: ["definitions"],
246
246
  OperationDefinition: [
247
+ "description",
247
248
  "name",
248
249
  "variableDefinitions",
249
250
  "directives",
250
251
  "selectionSet"
251
252
  ],
252
- VariableDefinition: ["variable", "type", "defaultValue", "directives"],
253
+ VariableDefinition: [
254
+ "description",
255
+ "variable",
256
+ "type",
257
+ "defaultValue",
258
+ "directives"
259
+ ],
253
260
  Variable: ["name"],
254
261
  SelectionSet: ["selections"],
255
262
  Field: ["alias", "name", "arguments", "directives", "selectionSet"],
@@ -257,6 +264,7 @@ var QueryDocumentKeys = {
257
264
  FragmentSpread: ["name", "directives"],
258
265
  InlineFragment: ["typeCondition", "directives", "selectionSet"],
259
266
  FragmentDefinition: [
267
+ "description",
260
268
  "name",
261
269
  // Note: fragment variable definitions are deprecated and will removed in v17.0.0
262
270
  "variableDefinitions",
@@ -313,7 +321,12 @@ var QueryDocumentKeys = {
313
321
  InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"],
314
322
  UnionTypeExtension: ["name", "directives", "types"],
315
323
  EnumTypeExtension: ["name", "directives", "values"],
316
- InputObjectTypeExtension: ["name", "directives", "fields"]
324
+ InputObjectTypeExtension: ["name", "directives", "fields"],
325
+ TypeCoordinate: ["name"],
326
+ MemberCoordinate: ["name", "memberName"],
327
+ ArgumentCoordinate: ["name", "fieldName", "argumentName"],
328
+ DirectiveCoordinate: ["name"],
329
+ DirectiveArgumentCoordinate: ["name", "argumentName"]
317
330
  };
318
331
  var kindValues = new Set(Object.keys(QueryDocumentKeys));
319
332
  function isNode(maybeNode) {
@@ -373,6 +386,11 @@ var Kind;
373
386
  Kind2["UNION_TYPE_EXTENSION"] = "UnionTypeExtension";
374
387
  Kind2["ENUM_TYPE_EXTENSION"] = "EnumTypeExtension";
375
388
  Kind2["INPUT_OBJECT_TYPE_EXTENSION"] = "InputObjectTypeExtension";
389
+ Kind2["TYPE_COORDINATE"] = "TypeCoordinate";
390
+ Kind2["MEMBER_COORDINATE"] = "MemberCoordinate";
391
+ Kind2["ARGUMENT_COORDINATE"] = "ArgumentCoordinate";
392
+ Kind2["DIRECTIVE_COORDINATE"] = "DirectiveCoordinate";
393
+ Kind2["DIRECTIVE_ARGUMENT_COORDINATE"] = "DirectiveArgumentCoordinate";
376
394
  })(Kind || (Kind = {}));
377
395
 
378
396
  // ../../node_modules/graphql/language/characterClasses.mjs
@@ -702,10 +720,7 @@ function visit(root2, visitor, visitorKeys = QueryDocumentKeys) {
702
720
  }
703
721
  }
704
722
  } else {
705
- node = Object.defineProperties(
706
- {},
707
- Object.getOwnPropertyDescriptors(node)
708
- );
723
+ node = { ...node };
709
724
  for (const [editKey, editValue] of edits) {
710
725
  node[editKey] = editValue;
711
726
  }
@@ -813,8 +828,8 @@ var printDocASTReducer = {
813
828
  },
814
829
  OperationDefinition: {
815
830
  leave(node) {
816
- const varDefs = wrap2("(", join(node.variableDefinitions, ", "), ")");
817
- const prefix = join(
831
+ const varDefs = hasMultilineItems(node.variableDefinitions) ? wrap2("(\n", join(node.variableDefinitions, "\n"), "\n)") : wrap2("(", join(node.variableDefinitions, ", "), ")");
832
+ const prefix = wrap2("", node.description, "\n") + join(
818
833
  [
819
834
  node.operation,
820
835
  join([node.name, varDefs]),
@@ -826,7 +841,7 @@ var printDocASTReducer = {
826
841
  }
827
842
  },
828
843
  VariableDefinition: {
829
- leave: ({ variable, type, defaultValue, directives }) => variable + ": " + type + wrap2(" = ", defaultValue) + wrap2(" ", join(directives, " "))
844
+ leave: ({ variable, type, defaultValue, directives, description }) => wrap2("", description, "\n") + variable + ": " + type + wrap2(" = ", defaultValue) + wrap2(" ", join(directives, " "))
830
845
  },
831
846
  SelectionSet: {
832
847
  leave: ({ selections }) => block(selections)
@@ -860,10 +875,16 @@ var printDocASTReducer = {
860
875
  )
861
876
  },
862
877
  FragmentDefinition: {
863
- leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => (
864
- // or removed in the future.
865
- `fragment ${name}${wrap2("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap2("", join(directives, " "), " ")}` + selectionSet
866
- )
878
+ leave: ({
879
+ name,
880
+ typeCondition,
881
+ variableDefinitions,
882
+ directives,
883
+ selectionSet,
884
+ description
885
+ }) => wrap2("", description, "\n") + // Note: fragment variable definitions are experimental and may be changed
886
+ // or removed in the future.
887
+ `fragment ${name}${wrap2("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap2("", join(directives, " "), " ")}` + selectionSet
867
888
  },
868
889
  // Value
869
890
  IntValue: {
@@ -1017,6 +1038,22 @@ var printDocASTReducer = {
1017
1038
  },
1018
1039
  InputObjectTypeExtension: {
1019
1040
  leave: ({ name, directives, fields }) => join(["extend input", name, join(directives, " "), block(fields)], " ")
1041
+ },
1042
+ // Schema Coordinates
1043
+ TypeCoordinate: {
1044
+ leave: ({ name }) => name
1045
+ },
1046
+ MemberCoordinate: {
1047
+ leave: ({ name, memberName }) => join([name, wrap2(".", memberName)])
1048
+ },
1049
+ ArgumentCoordinate: {
1050
+ leave: ({ name, fieldName, argumentName }) => join([name, wrap2(".", fieldName), wrap2("(", argumentName, ":)")])
1051
+ },
1052
+ DirectiveCoordinate: {
1053
+ leave: ({ name }) => join(["@", name])
1054
+ },
1055
+ DirectiveArgumentCoordinate: {
1056
+ leave: ({ name, argumentName }) => join(["@", name, wrap2("(", argumentName, ":)")])
1020
1057
  }
1021
1058
  };
1022
1059
  function join(maybeArray, separator = "") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/web",
3
- "version": "1.0.0-canary.13000+788440eb8",
3
+ "version": "1.0.0-canary.13002+f213ad7ba",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -145,14 +145,14 @@
145
145
  "dependencies": {
146
146
  "@apollo/client": "3.13.9",
147
147
  "@babel/runtime-corejs3": "7.28.4",
148
- "@cedarjs/auth": "1.0.0-canary.13000",
149
- "@cedarjs/server-store": "1.0.0-canary.13000",
148
+ "@cedarjs/auth": "1.0.0-canary.13002",
149
+ "@cedarjs/server-store": "1.0.0-canary.13002",
150
150
  "@dr.pogodin/react-helmet": "2.0.4",
151
151
  "@whatwg-node/fetch": "0.10.13",
152
152
  "apollo-upload-client": "18.0.1",
153
153
  "cookie": "1.1.1",
154
154
  "core-js": "3.42.0",
155
- "graphql": "16.9.0",
155
+ "graphql": "16.12.0",
156
156
  "graphql-sse": "2.5.4",
157
157
  "graphql-tag": "2.12.6",
158
158
  "react-hot-toast": "2.4.1",
@@ -166,8 +166,8 @@
166
166
  "@babel/core": "^7.26.10",
167
167
  "@babel/plugin-transform-runtime": "7.28.5",
168
168
  "@babel/runtime": "7.28.4",
169
- "@cedarjs/framework-tools": "1.0.0-canary.13000",
170
- "@cedarjs/internal": "1.0.0-canary.13000",
169
+ "@cedarjs/framework-tools": "1.0.0-canary.13002",
170
+ "@cedarjs/internal": "1.0.0-canary.13002",
171
171
  "@rollup/plugin-babel": "6.1.0",
172
172
  "@testing-library/jest-dom": "6.5.0",
173
173
  "@testing-library/react": "14.3.1",
@@ -191,5 +191,5 @@
191
191
  "publishConfig": {
192
192
  "access": "public"
193
193
  },
194
- "gitHead": "788440eb88af5e580bcbb49cfc74dae3cab2aa5c"
194
+ "gitHead": "f213ad7ba7ebb4768e41e24b4129bd0bc04df9b5"
195
195
  }