parent
b464189fb4
commit
cc85769231
|
@ -90,6 +90,7 @@ function genericPrint(path, options, print) {
|
||||||
)
|
)
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
|
options.trailingComma === "none" ? "" : ifBreak(","),
|
||||||
softline,
|
softline,
|
||||||
")"
|
")"
|
||||||
])
|
])
|
||||||
|
@ -134,6 +135,7 @@ function genericPrint(path, options, print) {
|
||||||
)
|
)
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
|
options.trailingComma === "none" ? "" : ifBreak(","),
|
||||||
softline,
|
softline,
|
||||||
"]"
|
"]"
|
||||||
])
|
])
|
||||||
|
@ -153,6 +155,7 @@ function genericPrint(path, options, print) {
|
||||||
)
|
)
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
|
options.trailingComma === "none" ? "" : ifBreak(","),
|
||||||
softline,
|
softline,
|
||||||
ifBreak("", options.bracketSpacing && n.fields.length > 0 ? " " : ""),
|
ifBreak("", options.bracketSpacing && n.fields.length > 0 ? " " : ""),
|
||||||
"}"
|
"}"
|
||||||
|
@ -185,6 +188,7 @@ function genericPrint(path, options, print) {
|
||||||
)
|
)
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
|
options.trailingComma === "none" ? "" : ifBreak(","),
|
||||||
softline,
|
softline,
|
||||||
")"
|
")"
|
||||||
])
|
])
|
||||||
|
|
|
@ -0,0 +1,127 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`trailing.graphql 1`] = `
|
||||||
|
fragment Visit on HighlightedVisit
|
||||||
|
@argumentDefinitions(
|
||||||
|
count: {type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}
|
||||||
|
test: [{type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}]
|
||||||
|
) {
|
||||||
|
cover_photo {
|
||||||
|
image(
|
||||||
|
width: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
height: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
sizing: "cover-fill",
|
||||||
|
scale: $scale,
|
||||||
|
) {
|
||||||
|
uri
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
fragment Visit on HighlightedVisit
|
||||||
|
@argumentDefinitions(
|
||||||
|
count: {
|
||||||
|
type: "Int",
|
||||||
|
defaultValue: 20,
|
||||||
|
someSuperSuperSuperSuperLongType: 301
|
||||||
|
},
|
||||||
|
test: [
|
||||||
|
{ type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301 }
|
||||||
|
]
|
||||||
|
) {
|
||||||
|
cover_photo {
|
||||||
|
image(
|
||||||
|
width: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
height: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
sizing: "cover-fill",
|
||||||
|
scale: $scale
|
||||||
|
) {
|
||||||
|
uri
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`trailing.graphql 2`] = `
|
||||||
|
fragment Visit on HighlightedVisit
|
||||||
|
@argumentDefinitions(
|
||||||
|
count: {type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}
|
||||||
|
test: [{type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}]
|
||||||
|
) {
|
||||||
|
cover_photo {
|
||||||
|
image(
|
||||||
|
width: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
height: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
sizing: "cover-fill",
|
||||||
|
scale: $scale,
|
||||||
|
) {
|
||||||
|
uri
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
fragment Visit on HighlightedVisit
|
||||||
|
@argumentDefinitions(
|
||||||
|
count: {
|
||||||
|
type: "Int",
|
||||||
|
defaultValue: 20,
|
||||||
|
someSuperSuperSuperSuperLongType: 301,
|
||||||
|
},
|
||||||
|
test: [
|
||||||
|
{ type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301 },
|
||||||
|
],
|
||||||
|
) {
|
||||||
|
cover_photo {
|
||||||
|
image(
|
||||||
|
width: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
height: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
sizing: "cover-fill",
|
||||||
|
scale: $scale,
|
||||||
|
) {
|
||||||
|
uri
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`trailing.graphql 3`] = `
|
||||||
|
fragment Visit on HighlightedVisit
|
||||||
|
@argumentDefinitions(
|
||||||
|
count: {type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}
|
||||||
|
test: [{type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}]
|
||||||
|
) {
|
||||||
|
cover_photo {
|
||||||
|
image(
|
||||||
|
width: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
height: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
sizing: "cover-fill",
|
||||||
|
scale: $scale,
|
||||||
|
) {
|
||||||
|
uri
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
fragment Visit on HighlightedVisit
|
||||||
|
@argumentDefinitions(
|
||||||
|
count: {
|
||||||
|
type: "Int",
|
||||||
|
defaultValue: 20,
|
||||||
|
someSuperSuperSuperSuperLongType: 301,
|
||||||
|
},
|
||||||
|
test: [
|
||||||
|
{ type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301 },
|
||||||
|
],
|
||||||
|
) {
|
||||||
|
cover_photo {
|
||||||
|
image(
|
||||||
|
width: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
height: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
sizing: "cover-fill",
|
||||||
|
scale: $scale,
|
||||||
|
) {
|
||||||
|
uri
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
|
@ -0,0 +1,3 @@
|
||||||
|
run_spec(__dirname, { parser: "graphql" });
|
||||||
|
run_spec(__dirname, { parser: "graphql", trailingComma: "all" });
|
||||||
|
run_spec(__dirname, { parser: "graphql", trailingComma: "es5" });
|
|
@ -0,0 +1,16 @@
|
||||||
|
fragment Visit on HighlightedVisit
|
||||||
|
@argumentDefinitions(
|
||||||
|
count: {type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}
|
||||||
|
test: [{type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}]
|
||||||
|
) {
|
||||||
|
cover_photo {
|
||||||
|
image(
|
||||||
|
width: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
height: $PROJECT_UNIT_CARD_SIZE,
|
||||||
|
sizing: "cover-fill",
|
||||||
|
scale: $scale,
|
||||||
|
) {
|
||||||
|
uri
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue