-
Notifications
You must be signed in to change notification settings - Fork 1
/
codegen.ts
51 lines (49 loc) · 1.99 KB
/
codegen.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import type { CodegenConfig } from '@graphql-codegen/cli'
const config: CodegenConfig = {
overwrite: true,
schema: './src/typeDefs/*.graphql',
generates: {
'src/types/schema.ts': {
plugins: ['typescript', 'typescript-resolvers'],
config: {
mapperTypeSuffix: 'Model',
mappers: {
GameWeek: '@/models/gameWeek#GameWeek',
Chip: '@/models/chip#Chip',
Player: '@/models/player#Player',
PastFixture: '@/models/pastFixture#PastFixture',
UpcomingFixture: '@/models/upcomingFixture#UpcomingFixture',
Team: '@/models/team#Team',
ElementType: '@/models/elementType#ElementType',
Fixture: '@/models/fixture#Fixture',
Manager: '@/models/manager#Manager',
LeagueSummary: '@/models/manager#LeagueSummary',
ManagerSquad: '@/models/managerSquad#ManagerSquad',
AutomaticSub: '@/models/managerSquad#AutomaticSub',
SquadPick: '@/models/managerSquad#SquadPick',
PastGameweek: '@/models/managerHistory#PastGameweek',
ManagerHistory: '@/models/managerHistory#ManagerHistory',
ClassicLeague: '@/models/classicLeague#ClassicLeague',
ClassicLeagueMeta:
'@/models/classicLeague#ClassicLeagueMeta',
ClassicLeagueStandings:
'@/models/classicLeague#ClassicLeagueStandings',
ClassicLeagueStanding:
'@/models/classicLeague#ClassicLeagueStanding',
H2hLeague: '@/models/h2hLeague#H2hLeague',
H2hLeagueMeta: '@/models/h2hLeague#H2hLeagueMeta',
H2hLeagueStandings: '@/models/h2hLeague#H2hLeagueStandings',
H2hLeagueStanding: '@/models/h2hLeague#H2hLeagueStanding',
NewEntries: '@/models/classicLeague#NewEntries',
NewEntry: '@/models/classicLeague#NewEntry',
DreamTeam: '@/models/dreamTeam#DreamTeam',
DreamTeamTopPlayer: '@/models/dreamTeam#DreamTeamTopPlayer',
DreamTeamSquadPick: '@/models/dreamTeam#DreamTeamSquadPick',
SetPieceNotes: '@/models/setPieceNotes#SetPieceNotes',
TeamSetPieceNote: '@/models/setPieceNotes#TeamSetPieceNote'
}
}
}
}
}
export default config