Test: Update printWidth indicator (#10293)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-01-31 03:45:41 +08:00
1 parent 6f458f46d0
commit 5017d66ea7
1328 files changed
+10117 -18807

No files matched your search

@@ -3,8 +3,7 @@
exports[`hello.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
{
short(var: $var, int: 5, float: 5.6, bool: true, string: "hello world!")
@@ -4,8 +4,7 @@ exports[`bracket_spacing.graphql - {"bracketSpacing":false} format 1`] = `
====================================options=====================================
bracketSpacing: false
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
fragment Visit on HighlightedVisit
@argumentDefinitions(
@@ -26,8 +25,7 @@ fragment Visit on HighlightedVisit
exports[`bracket_spacing.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
fragment Visit on HighlightedVisit
@argumentDefinitions(
@@ -3,8 +3,7 @@
exports[`argument_comment.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
query (
@@ -28,8 +27,7 @@ query (
exports[`dangling.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
query {
search(filters: {
@@ -56,8 +54,7 @@ query {
exports[`fields.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
query {
someField # Trailing comment
@@ -76,8 +73,7 @@ query {
exports[`interfaces.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
type Type1
implements
@@ -104,8 +100,7 @@ type Type1 implements A &
exports[`tokens.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# import "./claimsFragment.gql"
@@ -3,8 +3,7 @@
exports[`fields.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
query MyFirstQuery {
hello
@@ -3,8 +3,7 @@
exports[`directives.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# https://github.com/graphql/graphql-js/pull/2733/files
@@ -3,8 +3,7 @@
exports[`fragment.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# https://github.com/graphql/graphql-js/pull/4482
@@ -24,8 +23,7 @@ fragment Foo on Bar {
exports[`fragment-with-variable-description(legacy).graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# https://github.com/graphql/graphql-js/pull/4482
@@ -47,8 +45,7 @@ fragment Foo(
exports[`nameless-query-with-description.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# https://github.com/graphql/graphql-js/pull/4482
@@ -75,8 +72,7 @@ query {
exports[`operation-and-variable-definition-descriptions.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# https://github.com/graphql/graphql-js/pull/4482
@@ -111,8 +107,7 @@ query myQuery(
exports[`variable-definition-with-description-default value-and-directives.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# https://github.com/graphql/graphql-js/pull/4482
@@ -3,8 +3,7 @@
exports[`directive_decl.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
directive @a on QUERY
directive @a(as: String) on QUERY
@@ -3,8 +3,7 @@
exports[`directives.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
query MyQuery @directive(
arg: 5
@@ -3,8 +3,7 @@
exports[`enum.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
enum State {
PENDING
@@ -3,8 +3,7 @@
exports[`fields.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
{
posts {, title, votes, author {, firstName, posts {, author { firstName } }
@@ -3,8 +3,7 @@
exports[`fragment_variables.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
fragment F($var: Int) on Type {
field
@@ -3,8 +3,7 @@
exports[`fragments.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
{
field
@@ -3,8 +3,7 @@
exports[`hello.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
{
project(name: "GraphQL") {
@@ -3,8 +3,7 @@
exports[`interface.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# https://github.com/graphql/graphql-spec/blob/master/spec/Section%203%20--%20Type%20System.md#interfaces
@@ -95,8 +94,7 @@ extend interface Bar implements A & B & C {
exports[`many-interfaces.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
type Foo implements InterfaceOne & InterfaceTwo & InterfaceThree & InterfaceFour & InterfaceFive & InterfaceSix {
id: ID!
@@ -118,8 +116,7 @@ type Foo implements InterfaceOne &
exports[`object_type_def.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
type Artist implements Node & Entity {
# The ID of an object
@@ -173,8 +170,7 @@ type Artist implements Node & Entity {
exports[`object_type_def_mixed_syntax.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
type MixedArtist implements Node& Entity & Releasable {
# The ID of an object
@@ -228,8 +224,7 @@ type MixedArtist implements Node & Entity & Releasable {
exports[`object_type_def_old_syntax.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
type OldArtist implements Node& Entity {
# The ID of an object
@@ -283,8 +278,7 @@ type OldArtist implements Node & Entity {
exports[`separator-detection.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# This file used to test legacy syntax of interfaces that already removed in \`graphql\` v16
# Some comments are outdated
@@ -3,8 +3,7 @@
exports[`kitchen-sink.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# Copyright (c) 2015-present, Facebook, Inc.
#
@@ -136,8 +135,7 @@ fragment frag on Friend {
exports[`kitchen-sink-2.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# https://github.com/graphql/graphql-js/blob/b6a04a7357d6e7b6c37e3f060825dab8f6e1659d/src/__testUtils__/kitchenSinkQuery.ts
"Query description"
@@ -297,8 +295,7 @@ query {
exports[`schema-kitchen-sink.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# Copyright (c) 2015-present, Facebook, Inc.
#
@@ -3,8 +3,7 @@
exports[`lists.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
{
shortWithList(list: [1, 2, 3])
@@ -3,8 +3,7 @@
exports[`directive_decl.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
directive @dir(
# comment
@@ -33,8 +32,7 @@ directive @dir(
exports[`directives.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
query MyQuery @directive(
arg: 5
@@ -81,8 +79,7 @@ query MyQuery
exports[`enum.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
enum State {
# pending state
@@ -115,8 +112,7 @@ enum State {
exports[`fields.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
query MyFirstQuery {
# comment
@@ -190,8 +186,7 @@ subscription MySubscription {
exports[`input.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
input Params {
# Id
@@ -217,8 +212,7 @@ input Params {
exports[`interface.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
interface Actor {
# Id
@@ -246,8 +240,7 @@ interface Actor {
exports[`object_type_def.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
type Artist implements Node& Entity {
# The ID of an object
@@ -301,8 +294,7 @@ type Artist implements Node & Entity {
exports[`schema.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
# Schema
schema {
@@ -3,8 +3,7 @@
exports[`arguments.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
type Video {
playable_url(quality: String, preferred: String): Url
@@ -21,8 +20,7 @@ type Video {
exports[`directives.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
type PokemonType {
pokemon_type: String @mock(value: "Electric")
@@ -39,8 +37,7 @@ type PokemonType {
exports[`extend.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
extend type Feedback {
custom_int: Int
@@ -57,8 +54,7 @@ extend type Feedback {
exports[`implements.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
type VRMConversation implements Node& Entity @foo {
a: Int
@@ -75,8 +71,7 @@ type VRMConversation implements Node & Entity @foo {
exports[`input.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
input Params {
app_id: ID!
@@ -95,8 +90,7 @@ input Params {
exports[`object_type_def.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
type FeedHomeStories {
debug_info: String
@@ -3,8 +3,7 @@
exports[`objects.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
{
shortWithObj(obj: { hello: "world", x: 5 })
@@ -3,8 +3,7 @@
exports[`prettier-ignore-comment.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
{
# prettier-ignore
@@ -1,21 +1,20 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`issue2296.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
rangeEnd: 3
| | printWidth
=====================================input======================================
: ====================================options=====================================
: parsers: ["graphql"]
: rangeEnd: 3
: printWidth: 80 (default) |
: =====================================input======================================
> 1 | {NPC{life}}
| ^^^
2 |
=====================================output=====================================
{
NPC {
life
}
}
================================================================================
: =====================================output=====================================
: {
: NPC {
: life
: }
: }
:
: ================================================================================
`;
@@ -3,8 +3,7 @@
exports[`scalar.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
scalar Color @deprecated
@@ -3,8 +3,7 @@
exports[`schema.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
"""Schema definition description"""
schema {
@@ -3,8 +3,7 @@
exports[`description.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
""" Customer """
type Person {name: String}
@@ -177,8 +176,7 @@ type Person {
exports[`string.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
query X($a: Int) @relay(meta: "{\\"lowPri\\": true}") { a }
@@ -3,9 +3,8 @@
exports[`trailing.graphql - {"trailingComma":"all"} format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
trailingComma: "all"
| printWidth
printWidth: 80 (default) |
=====================================input======================================
query Query(
$pageID: ID!
@@ -63,9 +62,8 @@ query Query(
exports[`trailing.graphql - {"trailingComma":"es5"} format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
trailingComma: "es5"
| printWidth
printWidth: 80 (default) |
=====================================input======================================
query Query(
$pageID: ID!
@@ -123,9 +121,8 @@ query Query(
exports[`trailing.graphql - {"trailingComma":"none"} format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
trailingComma: "none"
| printWidth
printWidth: 80 (default) |
=====================================input======================================
query Query(
$pageID: ID!
@@ -3,8 +3,7 @@
exports[`type-extendsion-syntax.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
type User {
name: String
@@ -3,8 +3,7 @@
exports[`union_types.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
union myUnion = ATypeName | ASecondTypeName
@@ -3,8 +3,7 @@
exports[`variable_definitions.graphql format 1`] = `
====================================options=====================================
parsers: ["graphql"]
printWidth: 80
| printWidth
printWidth: 80 (default) |
=====================================input======================================
query short($foo:ComplexType, $site : Site = MOBILE, $nonNull: Int!) {
hello