Skip to content

Commit 2e68c81

Browse files
committed
format code :)
1 parent 637da5a commit 2e68c81

File tree

5 files changed

+467
-84
lines changed

5 files changed

+467
-84
lines changed

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
src/gql
1+
node_modules
2+
dist

codegen.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ generates:
88
preset: gql-tag-operations-preset
99
presetConfig:
1010
fragmentMasking: true
11+
12+
hooks:
13+
afterOneFileWrite:
14+
- prettier --write

src/CharacterEditor.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,6 @@ import { useResetState } from "./useResetState";
3535
import { OBSInstructions } from "./OBSInstructions";
3636
import { CreateCharacterMutation } from "./LandingPage";
3737

38-
const CharacterViewFragment = gql(/* GraphQL */ `
39-
fragment CharacterViewFragment on Character {
40-
id
41-
name
42-
imageUrl
43-
maximumHealth
44-
currentHealth
45-
hasMana
46-
maximumMana
47-
currentMana
48-
hasFatePoints
49-
maximumFatePoints
50-
currentFatePoints
51-
}
52-
`);
53-
5438
const CharacterEditorQuery = gql(/* GraphQL */ `
5539
query CharacterEditorQuery($editHash: ID!) @live {
5640
characterEditor(editHash: $editHash) {
@@ -146,6 +130,22 @@ const UpdateCharacterMutation = gql(/* GraphQL */ `
146130
}
147131
`);
148132

133+
const CharacterViewFragment = gql(/* GraphQL */ `
134+
fragment CharacterViewFragment on Character {
135+
id
136+
name
137+
imageUrl
138+
maximumHealth
139+
currentHealth
140+
hasMana
141+
maximumMana
142+
currentMana
143+
hasFatePoints
144+
maximumFatePoints
145+
currentFatePoints
146+
}
147+
`);
148+
149149
const Editor = (props: {
150150
character: FragmentType<typeof CharacterViewFragment>;
151151
editHash: string;

src/gql/gql.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
44

55
const documents = {
66
"\n query CharacterQuery($characterId: ID!) @live {\n character(id: $characterId) {\n id\n ...CharacterViewFragment\n ...CharacterOverlayFragment\n }\n }\n": graphql.CharacterQueryDocument,
7-
"\n fragment CharacterViewFragment on Character {\n id\n name\n imageUrl\n maximumHealth\n currentHealth\n hasMana\n maximumMana\n currentMana\n hasFatePoints\n maximumFatePoints\n currentFatePoints\n }\n": graphql.CharacterViewFragmentFragmentDoc,
87
"\n query CharacterEditorQuery($editHash: ID!) @live {\n characterEditor(editHash: $editHash) {\n __typename\n ... on Error {\n reason\n }\n ... on CharacterEditorView {\n character {\n id\n ...CharacterViewFragment\n }\n }\n }\n }\n": graphql.CharacterEditorQueryDocument,
98
"\n mutation UpdateCharacterMutation($input: UpdateCharacterInput!) {\n updateCharacter(input: $input)\n }\n": graphql.UpdateCharacterMutationDocument,
9+
"\n fragment CharacterViewFragment on Character {\n id\n name\n imageUrl\n maximumHealth\n currentHealth\n hasMana\n maximumMana\n currentMana\n hasFatePoints\n maximumFatePoints\n currentFatePoints\n }\n": graphql.CharacterViewFragmentFragmentDoc,
1010
"\n fragment CharacterOverlayFragment on Character {\n id\n name\n currentHealth\n maximumHealth\n hasMana\n currentMana\n maximumMana\n hasFatePoints\n currentFatePoints\n maximumFatePoints\n imageUrl\n }\n": graphql.CharacterOverlayFragmentFragmentDoc,
1111
"\n mutation CreateCharacterMutation {\n createCharacter {\n __typename\n ... on Error {\n reason\n }\n ... on CreateCharacterSuccess {\n editHash\n }\n }\n }\n": graphql.CreateCharacterMutationDocument,
1212
};
1313

1414
export function gql(source: "\n query CharacterQuery($characterId: ID!) @live {\n character(id: $characterId) {\n id\n ...CharacterViewFragment\n ...CharacterOverlayFragment\n }\n }\n"): (typeof documents)["\n query CharacterQuery($characterId: ID!) @live {\n character(id: $characterId) {\n id\n ...CharacterViewFragment\n ...CharacterOverlayFragment\n }\n }\n"];
15-
export function gql(source: "\n fragment CharacterViewFragment on Character {\n id\n name\n imageUrl\n maximumHealth\n currentHealth\n hasMana\n maximumMana\n currentMana\n hasFatePoints\n maximumFatePoints\n currentFatePoints\n }\n"): (typeof documents)["\n fragment CharacterViewFragment on Character {\n id\n name\n imageUrl\n maximumHealth\n currentHealth\n hasMana\n maximumMana\n currentMana\n hasFatePoints\n maximumFatePoints\n currentFatePoints\n }\n"];
1615
export function gql(source: "\n query CharacterEditorQuery($editHash: ID!) @live {\n characterEditor(editHash: $editHash) {\n __typename\n ... on Error {\n reason\n }\n ... on CharacterEditorView {\n character {\n id\n ...CharacterViewFragment\n }\n }\n }\n }\n"): (typeof documents)["\n query CharacterEditorQuery($editHash: ID!) @live {\n characterEditor(editHash: $editHash) {\n __typename\n ... on Error {\n reason\n }\n ... on CharacterEditorView {\n character {\n id\n ...CharacterViewFragment\n }\n }\n }\n }\n"];
1716
export function gql(source: "\n mutation UpdateCharacterMutation($input: UpdateCharacterInput!) {\n updateCharacter(input: $input)\n }\n"): (typeof documents)["\n mutation UpdateCharacterMutation($input: UpdateCharacterInput!) {\n updateCharacter(input: $input)\n }\n"];
17+
export function gql(source: "\n fragment CharacterViewFragment on Character {\n id\n name\n imageUrl\n maximumHealth\n currentHealth\n hasMana\n maximumMana\n currentMana\n hasFatePoints\n maximumFatePoints\n currentFatePoints\n }\n"): (typeof documents)["\n fragment CharacterViewFragment on Character {\n id\n name\n imageUrl\n maximumHealth\n currentHealth\n hasMana\n maximumMana\n currentMana\n hasFatePoints\n maximumFatePoints\n currentFatePoints\n }\n"];
1818
export function gql(source: "\n fragment CharacterOverlayFragment on Character {\n id\n name\n currentHealth\n maximumHealth\n hasMana\n currentMana\n maximumMana\n hasFatePoints\n currentFatePoints\n maximumFatePoints\n imageUrl\n }\n"): (typeof documents)["\n fragment CharacterOverlayFragment on Character {\n id\n name\n currentHealth\n maximumHealth\n hasMana\n currentMana\n maximumMana\n hasFatePoints\n currentFatePoints\n maximumFatePoints\n imageUrl\n }\n"];
1919
export function gql(source: "\n mutation CreateCharacterMutation {\n createCharacter {\n __typename\n ... on Error {\n reason\n }\n ... on CreateCharacterSuccess {\n editHash\n }\n }\n }\n"): (typeof documents)["\n mutation CreateCharacterMutation {\n createCharacter {\n __typename\n ... on Error {\n reason\n }\n ... on CreateCharacterSuccess {\n editHash\n }\n }\n }\n"];
2020

0 commit comments

Comments
 (0)