├── Modules
├── Features
│ ├── README.md
│ ├── Sources
│ │ ├── World
│ │ │ ├── UI
│ │ │ │ └── WorldListView.swift
│ │ │ └── GQL
│ │ │ │ └── world.graphql
│ │ ├── Items
│ │ │ ├── UI
│ │ │ │ ├── ItemsList
│ │ │ │ │ ├── ItemTab.swift
│ │ │ │ │ ├── ItemsListRowView.swift
│ │ │ │ │ ├── ItemsListView.swift
│ │ │ │ │ └── ItemsListViewModel.swift
│ │ │ │ └── ItemDetail
│ │ │ │ │ ├── ItemDetailViewModel.swift
│ │ │ │ │ └── ItemDetailView.swift
│ │ │ └── GQL
│ │ │ │ ├── items.graphql
│ │ │ │ └── Items.swift
│ │ ├── Magic
│ │ │ ├── UI
│ │ │ │ ├── MagicTab.swift
│ │ │ │ ├── MagicRowView.swift
│ │ │ │ ├── MagicDetailView.swift
│ │ │ │ ├── MagicListView.swift
│ │ │ │ └── MagicListViewModel.swift
│ │ │ └── GQL
│ │ │ │ ├── magic.graphql
│ │ │ │ └── Magic.swift
│ │ └── Tabbar
│ │ │ ├── Tabbar.swift
│ │ │ └── Tabs.swift
│ └── Package.swift
├── SharedUI
│ ├── Sources
│ │ └── SharedUI
│ │ │ ├── Resources
│ │ │ ├── Colors.xcassets
│ │ │ │ ├── Contents.json
│ │ │ │ ├── mud.colorset
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── sky.colorset
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── edtree.colorset
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── grass.colorset
│ │ │ │ │ └── Contents.json
│ │ │ │ └── sky-light.colorset
│ │ │ │ │ └── Contents.json
│ │ │ └── Fonts
│ │ │ │ └── Mantinia Regular.otf
│ │ │ ├── SectionTitle.swift
│ │ │ ├── Color.swift
│ │ │ ├── SimpleSection.swift
│ │ │ ├── ScalingSection.swift
│ │ │ ├── AttributeDataSection.swift
│ │ │ └── Font.swift
│ ├── README.md
│ ├── .gitignore
│ └── Package.swift
├── Networking
│ ├── README.md
│ ├── Tests
│ │ └── NetworkingTests
│ │ │ └── NetworkingTests.swift
│ ├── Sources
│ │ └── Networking
│ │ │ ├── GQL
│ │ │ └── shared.graphql
│ │ │ └── GQLClient.swift
│ ├── .gitignore
│ └── Package.swift
├── Items
│ └── .gitignore
├── Models
│ ├── .swiftpm
│ │ └── xcode
│ │ │ └── package.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Sources
│ │ ├── ApolloModels
│ │ │ ├── .swiftpm
│ │ │ │ └── xcode
│ │ │ │ │ └── package.xcworkspace
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Types.graphql.swift
│ │ │ ├── shared.graphql.swift
│ │ │ ├── world.graphql.swift
│ │ │ └── magic.graphql.swift
│ │ └── ApolloCodegen
│ │ │ ├── .swiftpm
│ │ │ └── xcode
│ │ │ │ └── package.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ │ └── main.swift
│ ├── README.md
│ ├── Package.resolved
│ ├── Package.swift
│ └── Schema
│ │ ├── schema.graphqls
│ │ └── introspection_response.json
├── ApolloModels
│ └── .gitignore
└── ApolloCodegen
│ └── .gitignore
├── The Roundtable
├── Assets.xcassets
│ ├── Contents.json
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Preview Content
│ └── Preview Assets.xcassets
│ │ └── Contents.json
└── App.swift
├── The Roundtable.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── swiftpm
│ │ └── Package.resolved
└── project.pbxproj
├── LICENSE
├── Readme.md
└── .gitignore
/Modules/Features/README.md:
--------------------------------------------------------------------------------
1 | # Features
2 |
3 | A package containing the different features that the app import.
4 |
--------------------------------------------------------------------------------
/The Roundtable/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/The Roundtable/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/Resources/Colors.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Modules/Networking/README.md:
--------------------------------------------------------------------------------
1 | # Networking
2 |
3 | Everything needed for doing GQL Queries against the Elden Ring API.
4 | API URL: https://eldenring.fanapis.com/api/graphql
5 |
--------------------------------------------------------------------------------
/Modules/Networking/Tests/NetworkingTests/NetworkingTests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | @testable import Networking
3 |
4 | final class NetworkingTests: XCTestCase {
5 |
6 | }
7 |
--------------------------------------------------------------------------------
/Modules/SharedUI/README.md:
--------------------------------------------------------------------------------
1 | # SharedUI
2 |
3 | Some shared UI like colors and non domain specific components that can be reused across all features packages and the app itself.
4 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/Resources/Fonts/Mantinia Regular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dimillian/The-Roundtable/HEAD/Modules/SharedUI/Sources/SharedUI/Resources/Fonts/Mantinia Regular.otf
--------------------------------------------------------------------------------
/The Roundtable.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Modules/Items/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /.build
3 | /Packages
4 | /*.xcodeproj
5 | xcuserdata/
6 | DerivedData/
7 | .swiftpm/config/registries.json
8 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9 | .netrc
10 |
--------------------------------------------------------------------------------
/Modules/Models/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Modules/Networking/Sources/Networking/GQL/shared.graphql:
--------------------------------------------------------------------------------
1 | fragment AttributeEntryData on AttributeEntry {
2 | name
3 | amount
4 | }
5 |
6 | fragment ScallingEntryData on ScallingEntry {
7 | name
8 | scalling
9 | }
10 |
--------------------------------------------------------------------------------
/Modules/SharedUI/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /.build
3 | /Packages
4 | /*.xcodeproj
5 | xcuserdata/
6 | DerivedData/
7 | .swiftpm/config/registries.json
8 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9 | .netrc
10 |
--------------------------------------------------------------------------------
/Modules/ApolloModels/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /.build
3 | /Packages
4 | /*.xcodeproj
5 | xcuserdata/
6 | DerivedData/
7 | .swiftpm/config/registries.json
8 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9 | .netrc
10 |
--------------------------------------------------------------------------------
/Modules/Networking/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /.build
3 | /Packages
4 | /*.xcodeproj
5 | xcuserdata/
6 | DerivedData/
7 | .swiftpm/config/registries.json
8 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9 | .netrc
10 |
--------------------------------------------------------------------------------
/The Roundtable/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Modules/Models/Sources/ApolloModels/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Modules/Models/Sources/ApolloModels/Types.graphql.swift:
--------------------------------------------------------------------------------
1 | // @generated
2 | // This file was automatically generated and should not be edited.
3 |
4 | import Apollo
5 | import Foundation
6 |
7 | /// GQL namespace
8 | public enum GQL {
9 | }
10 |
--------------------------------------------------------------------------------
/Modules/Models/Sources/ApolloCodegen/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Modules/Models/README.md:
--------------------------------------------------------------------------------
1 | # Models
2 |
3 | Include ApolloCodegen, a CLI to generate GQL Swift files from the schema into ApolloModels package.
4 |
5 | You can run to download the schema, the Apollo CLI and then generate models.
6 |
7 | `swift run ApolloCodegen all`
8 |
--------------------------------------------------------------------------------
/The Roundtable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Modules/Models/Sources/ApolloModels/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/World/UI/WorldListView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | public struct WorldListView: View {
4 | public init() { }
5 |
6 | public var body: some View {
7 | List {
8 | Text("Loading....")
9 | }
10 | }
11 | }
12 |
13 | struct WorldListView_Previews: PreviewProvider {
14 | static var previews: some View {
15 | WorldListView()
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/Resources/Colors.xcassets/mud.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0x43",
9 | "green" : "0x79",
10 | "red" : "0xB0"
11 | }
12 | },
13 | "idiom" : "universal"
14 | }
15 | ],
16 | "info" : {
17 | "author" : "xcode",
18 | "version" : 1
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/Resources/Colors.xcassets/sky.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0x25",
9 | "green" : "0x23",
10 | "red" : "0x19"
11 | }
12 | },
13 | "idiom" : "universal"
14 | }
15 | ],
16 | "info" : {
17 | "author" : "xcode",
18 | "version" : 1
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/Resources/Colors.xcassets/edtree.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0x6D",
9 | "green" : "0xD1",
10 | "red" : "0xF1"
11 | }
12 | },
13 | "idiom" : "universal"
14 | }
15 | ],
16 | "info" : {
17 | "author" : "xcode",
18 | "version" : 1
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/Resources/Colors.xcassets/grass.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0x48",
9 | "green" : "0x67",
10 | "red" : "0x46"
11 | }
12 | },
13 | "idiom" : "universal"
14 | }
15 | ],
16 | "info" : {
17 | "author" : "xcode",
18 | "version" : 1
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/Resources/Colors.xcassets/sky-light.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0x3F",
9 | "green" : "0x40",
10 | "red" : "0x31"
11 | }
12 | },
13 | "idiom" : "universal"
14 | }
15 | ],
16 | "info" : {
17 | "author" : "xcode",
18 | "version" : 1
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Items/UI/ItemsList/ItemTab.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | enum ItemTab: Int, Identifiable, CaseIterable, Equatable {
4 | case items, armor, weapon, talisman
5 |
6 | var id: Int {
7 | rawValue
8 | }
9 |
10 | var title: String {
11 | switch self {
12 | case .items:
13 | return "Items"
14 | case .weapon:
15 | return "Weapons"
16 | case .armor:
17 | return "Armors"
18 | case .talisman:
19 | return "Talismans"
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Magic/UI/MagicTab.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | enum MagicTab: Int, Identifiable, CaseIterable, Equatable {
4 | case sorcery, incantation, ashOfWar, spirit
5 |
6 | var id: Int {
7 | rawValue
8 | }
9 |
10 | var title: String {
11 | switch self {
12 | case .sorcery:
13 | return "Sorcery"
14 | case .incantation:
15 | return "Incantation"
16 | case .ashOfWar:
17 | return "Ash of War"
18 | case .spirit:
19 | return "Spirit"
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/SectionTitle.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | public struct SectionTitle: View {
4 | public let title: String
5 |
6 | public init(title: String) {
7 | self.title = title
8 | }
9 |
10 | public var body: some View {
11 | Text(title.uppercased())
12 | .font(.mantinia(size: 14))
13 | .foregroundColor(.white)
14 | }
15 | }
16 |
17 | struct SectionTitle_Previews: PreviewProvider {
18 | static var previews: some View {
19 | List {
20 | SectionTitle(title: "Test")
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/Color.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import SwiftUI
3 |
4 | extension Color {
5 | public static var sky: Color {
6 | .init("sky", bundle: .module)
7 | }
8 |
9 | public static var skyLight: Color {
10 | .init("sky-light", bundle: .module)
11 | }
12 |
13 | public static var edtree: Color {
14 | .init("edtree", bundle: .module)
15 | }
16 |
17 | public static var mud: Color {
18 | .init("mud", bundle: .module)
19 | }
20 |
21 | public static var grass: Color {
22 | .init("grass", bundle: .module)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Tabbar/Tabbar.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import SharedUI
3 |
4 | public struct Tabbar: View {
5 | @State private var selectedTab: Tabs = .items
6 |
7 | public init() {}
8 |
9 | public var body: some View {
10 | TabView(selection: $selectedTab) {
11 | ForEach(Tabs.allCases) { tab in
12 | tab.contentView.tabItem {
13 | Label {
14 | Text(tab.title.uppercased())
15 | } icon: {
16 | Image(systemName: tab.iconName)
17 | }
18 | }
19 | }
20 | }.accentColor(.edtree)
21 | }
22 | }
23 |
24 | struct Tabbar_Previews: PreviewProvider {
25 | static var previews: some View {
26 | Tabbar()
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/World/GQL/world.graphql:
--------------------------------------------------------------------------------
1 | query GetWorld($page: Int!, $limit: Int!) {
2 | npc(page: $page, limit: $limit) {
3 | ...NPCData
4 | }
5 | boss(page: $page, limit: $limit) {
6 | ...BossData
7 | }
8 | creature(page: $page, limit: $limit) {
9 | ...CreatureData
10 | }
11 | }
12 |
13 | fragment NPCData on Npc {
14 | id
15 | name
16 | location
17 | role
18 | image
19 | quote
20 | description
21 | }
22 |
23 | fragment BossData on Boss {
24 | id
25 | name
26 | location
27 | description
28 | healthPoints
29 | drops
30 | image
31 | }
32 |
33 | fragment CreatureData on Creature {
34 | id
35 | name
36 | location
37 | image
38 | drops
39 | description
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Magic/UI/MagicRowView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import ApolloModels
3 | import SharedUI
4 | import Kingfisher
5 |
6 | struct MagicRowView: View {
7 | let magic: BaseMagicData
8 |
9 | var body: some View {
10 | VStack(alignment: .leading, spacing: 8) {
11 | HStack {
12 | if let urlString = magic.image,
13 | let url = URL(string: urlString) {
14 | KFImage(url)
15 | .resizable()
16 | .frame(width: 50, height: 50)
17 | }
18 | Text(magic.name?.uppercased() ?? "")
19 | .font(.mantinia(size: 14))
20 | }
21 | Text(magic.description ?? "")
22 | .font(.body)
23 | .lineLimit(2)
24 | }
25 | .foregroundColor(.white)
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/SimpleSection.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | public struct SimpleSection: View {
4 | public let title: String
5 | public let content: String
6 |
7 | public init(title: String, content: String) {
8 | self.title = title
9 | self.content = content
10 | }
11 |
12 | public var body: some View {
13 | Section {
14 | Text(content)
15 | .font(.body)
16 | .foregroundColor(.white)
17 | .listRowBackground(Color.sky)
18 | } header: {
19 | SectionTitle(title: title)
20 | }
21 | }
22 | }
23 |
24 | struct SimpleSection_Previews: PreviewProvider {
25 | static var previews: some View {
26 | List {
27 | SimpleSection(title: "Test", content: "Test")
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/ScalingSection.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import ApolloModels
3 |
4 | public struct ScalingSection: View {
5 | public let title: String
6 | public let data: [GQL.ScallingEntryData]
7 |
8 | public init(title: String, data: [GQL.ScallingEntryData]) {
9 | self.title = title
10 | self.data = data
11 | }
12 |
13 | public var body: some View {
14 | Section {
15 | VStack {
16 | ForEach(data, id: \.name) { attribute in
17 | HStack {
18 | Text(attribute.name ?? "")
19 | Spacer()
20 | Text(attribute.scalling ?? "")
21 | }
22 | Divider()
23 | }
24 | }
25 | .listRowBackground(Color.sky)
26 | } header: {
27 | SectionTitle(title: title)
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/AttributeDataSection.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import ApolloModels
3 |
4 | public struct AttributeDataSection: View {
5 | public let title: String
6 | public let data: [GQL.AttributeEntryData]
7 |
8 | public init(title: String, data: [GQL.AttributeEntryData]) {
9 | self.title = title
10 | self.data = data
11 | }
12 |
13 | public var body: some View {
14 | Section {
15 | VStack {
16 | ForEach(data, id: \.name) { attribute in
17 | HStack {
18 | Text(attribute.name ?? "")
19 | Spacer()
20 | Text("\(attribute.amount ?? 0)")
21 | }
22 | Divider()
23 | }
24 | }
25 | .listRowBackground(Color.sky)
26 | } header: {
27 | SectionTitle(title: title)
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Modules/Networking/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version: 5.6
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "Networking",
8 | platforms: [
9 | .iOS(.v15),
10 | ],
11 | products: [
12 | .library(
13 | name: "Networking",
14 | targets: ["Networking"]),
15 | ],
16 | dependencies: [
17 | .package(url: "https://github.com/apollographql/apollo-ios.git", .upToNextMajor(from: "0.51.2")),
18 | ],
19 | targets: [
20 | .target(
21 | name: "Networking",
22 | dependencies: [
23 | .product(name: "Apollo", package: "apollo-ios")
24 | ],
25 | exclude: ["GQL/shared.graphql"]),
26 | .testTarget(
27 | name: "NetworkingTests",
28 | dependencies: ["Networking"]),
29 | ]
30 | )
31 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Items/UI/ItemsList/ItemsListRowView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import ApolloModels
3 | import SharedUI
4 | import Kingfisher
5 |
6 | struct ItemsListRowView: View {
7 | let item: BaseItemData
8 |
9 | var body: some View {
10 | VStack(alignment: .leading, spacing: 8) {
11 | HStack {
12 | if let urlString = item.image,
13 | let url = URL(string: urlString) {
14 | KFImage(url)
15 | .resizable()
16 | .frame(width: 50, height: 50)
17 | }
18 | Text(item.name?.uppercased() ?? "")
19 | .font(.mantinia(size: 14))
20 | }
21 | Text(item.description ?? "")
22 | .font(.body)
23 | .lineLimit(2)
24 | }
25 | .foregroundColor(.white)
26 | }
27 | }
28 |
29 | struct ItemsListRowView_Previews: PreviewProvider {
30 | static var previews: some View {
31 | ItemsListRowView(item: previewItem)
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version: 5.6
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "SharedUI",
8 | platforms: [
9 | .iOS(.v15),
10 | ],
11 | products: [
12 | .library(
13 | name: "SharedUI",
14 | targets: ["SharedUI"]),
15 | ],
16 | dependencies: [
17 | .package(url: "https://github.com/onevcat/Kingfisher",
18 | .upToNextMajor(from: "7.2.0")),
19 | .package(name: "Models", path: "./Models"),
20 | ],
21 | targets: [
22 | .target(
23 | name: "SharedUI",
24 | dependencies: [.product(name: "ApolloModels", package: "Models"),
25 | .product(name: "Kingfisher", package: "Kingfisher")],
26 | resources: [
27 | .process("Resources/Colors.xcassets"),
28 | .process("Resources/Fonts")
29 | ]),
30 | ]
31 | )
32 |
--------------------------------------------------------------------------------
/Modules/Models/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "pins" : [
3 | {
4 | "identity" : "apollo-ios",
5 | "kind" : "remoteSourceControl",
6 | "location" : "https://github.com/apollographql/apollo-ios.git",
7 | "state" : {
8 | "revision" : "08a41bad4ebf76ae8e4efebf26862a42084b7786",
9 | "version" : "0.51.2"
10 | }
11 | },
12 | {
13 | "identity" : "sqlite.swift",
14 | "kind" : "remoteSourceControl",
15 | "location" : "https://github.com/stephencelis/SQLite.swift.git",
16 | "state" : {
17 | "revision" : "5f5ad81ac0d0a0f3e56e39e646e8423c617df523",
18 | "version" : "0.13.2"
19 | }
20 | },
21 | {
22 | "identity" : "swift-argument-parser",
23 | "kind" : "remoteSourceControl",
24 | "location" : "https://github.com/apple/swift-argument-parser.git",
25 | "state" : {
26 | "revision" : "9564d61b08a5335ae0a36f789a7d71493eacadfc",
27 | "version" : "0.3.2"
28 | }
29 | }
30 | ],
31 | "version" : 2
32 | }
33 |
--------------------------------------------------------------------------------
/The Roundtable/App.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import SharedUI
3 | import Tabbar
4 |
5 | @main
6 | struct MainApp: App {
7 | init() {
8 | Font.registerFonts()
9 | setupAppearance()
10 | }
11 |
12 | var body: some Scene {
13 | WindowGroup {
14 | Tabbar()
15 | .preferredColorScheme(.dark)
16 | }
17 | }
18 |
19 | private func setupAppearance() {
20 | UITabBarItem
21 | .appearance()
22 | .setTitleTextAttributes([.font: UIFont.mantinia(size: 11)],for: .normal)
23 | UITabBar
24 | .appearance()
25 | .barTintColor = UIColor(.sky)
26 | UINavigationBar.appearance().largeTitleTextAttributes = [.font: UIFont.mantinia(size: 24),
27 | .foregroundColor: UIColor.white]
28 | UINavigationBar.appearance().titleTextAttributes = [.font: UIFont.mantinia(size: 16),
29 | .foregroundColor: UIColor.white]
30 | UINavigationBar.appearance().barTintColor = UIColor(.sky)
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Magic/GQL/magic.graphql:
--------------------------------------------------------------------------------
1 | query GetMagic($page: Int!, $limit: Int!) {
2 | sorcery(page: $page, limit: $limit) {
3 | ...SorceryData
4 | }
5 | incantation(page: $page, limit: $limit) {
6 | ...IncantationData
7 | }
8 | ashOfWar(page: $page, limit: $limit) {
9 | ...AshOfWarData
10 | }
11 | spirit(page: $page, limit: $limit) {
12 | ...SpiritData
13 | }
14 | }
15 |
16 | fragment IncantationData on Incantation {
17 | id
18 | name
19 | description
20 | effects
21 | image
22 | slots
23 | cost
24 | requires {
25 | ...AttributeEntryData
26 | }
27 | }
28 |
29 | fragment SorceryData on Sorcery {
30 | id
31 | name
32 | description
33 | effects
34 | image
35 | slots
36 | cost
37 | requires {
38 | ...AttributeEntryData
39 | }
40 | }
41 |
42 | fragment AshOfWarData on AshOfWar {
43 | id
44 | name
45 | image
46 | description
47 | affinity
48 | skill
49 | }
50 |
51 | fragment SpiritData on Spirit {
52 | id
53 | name
54 | image
55 | description
56 | fpCost
57 | hpCost
58 | effect
59 | }
60 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Thomas Ricouard
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Modules/Models/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version: 5.6
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "Models",
8 | platforms: [
9 | .iOS(.v15),
10 | .macOS(.v10_14)
11 | ],
12 | products: [
13 | .executable(name: "ApolloCodegen", targets: ["ApolloCodegen"]),
14 | .library(name: "ApolloModels", targets: ["ApolloModels"]),
15 | ],
16 | dependencies: [
17 | .package(url: "https://github.com/apollographql/apollo-ios.git",
18 | .upToNextMajor(from: "0.51.2")),
19 | .package(url: "https://github.com/apple/swift-argument-parser.git",
20 | .upToNextMinor(from: "0.3.0")),
21 | ],
22 | targets: [
23 | .executableTarget(
24 | name: "ApolloCodegen",
25 | dependencies: [
26 | .product(name: "ApolloCodegenLib", package: "apollo-ios"),
27 | .product(name: "ArgumentParser", package: "swift-argument-parser")
28 | ]),
29 | .target(
30 | name: "ApolloModels",
31 | dependencies: [
32 | .product(name: "Apollo", package: "apollo-ios")
33 | ]),
34 | ]
35 | )
36 |
--------------------------------------------------------------------------------
/Modules/SharedUI/Sources/SharedUI/Font.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import SwiftUI
3 | import UIKit
4 |
5 | extension Font {
6 | public static func registerFonts() {
7 | _ = UIFont.registerFont(bundle: .module, fontName: "Mantinia Regular", fontExtension: "otf")
8 | }
9 |
10 | public static func mantinia(size: CGFloat) -> Font {
11 | return .custom("Mantinia", size: size)
12 | }
13 | }
14 |
15 | extension UIFont {
16 | public static func mantinia(size: CGFloat) -> UIFont {
17 | return UIFont(name: "Mantinia", size: size)!
18 | }
19 |
20 | static func registerFont(bundle: Bundle, fontName: String, fontExtension: String) -> Bool {
21 | guard let fontURL = bundle.url(forResource: fontName, withExtension: fontExtension) else {
22 | fatalError("Couldn't find font \(fontName)")
23 | }
24 | guard let fontDataProvider = CGDataProvider(url: fontURL as CFURL) else {
25 | fatalError("Couldn't load data from the font \(fontName)")
26 | }
27 | guard let font = CGFont(fontDataProvider) else {
28 | fatalError("Couldn't create font from data")
29 | }
30 | var error: Unmanaged?
31 | return CTFontManagerRegisterGraphicsFont(font, &error)
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Tabbar/Tabs.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import Items
3 | import Magic
4 | import World
5 |
6 | enum Tabs: Int, CaseIterable, Identifiable {
7 | case items, magic, world, locations, notes
8 |
9 | var id: Int {
10 | self.rawValue
11 | }
12 |
13 | @ViewBuilder
14 | var contentView: some View {
15 | switch self {
16 | case .items:
17 | ItemsListView()
18 | case .magic:
19 | MagicListView()
20 | case .world:
21 | WorldListView()
22 | case .locations:
23 | Color.brown
24 | case .notes:
25 | Color.cyan
26 | }
27 | }
28 |
29 | var title: String {
30 | switch self {
31 | case .items:
32 | return "Items"
33 | case .magic:
34 | return "Magic"
35 | case .world:
36 | return "World"
37 | case .locations:
38 | return "Locations"
39 | case .notes:
40 | return "Notes"
41 | }
42 | }
43 |
44 | var iconName: String {
45 | switch self {
46 | case .items:
47 | return "bag"
48 | case .magic:
49 | return "wand.and.stars"
50 | case .world:
51 | return "globe.europe.africa"
52 | case .locations:
53 | return "map"
54 | case .notes:
55 | return "note.text"
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Items/UI/ItemDetail/ItemDetailViewModel.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import Foundation
3 | import ApolloModels
4 | import Networking
5 |
6 | @MainActor
7 | class ItemDetailViewModel: ObservableObject {
8 | @Published var item: BaseItemData?
9 |
10 | private let baseItem: BaseItemData
11 |
12 | init(baseItem: BaseItemData) {
13 | self.baseItem = baseItem
14 | }
15 |
16 | func fetchItemData() async {
17 | do {
18 | switch baseItem.itemType {
19 | case .item:
20 | let query = GQL.GetItemQuery(id: baseItem.id)
21 | self.item = try await GQLClient.shared.fetch(query: query).getItem.fragments.itemData
22 | case .armor:
23 | let query = GQL.GetArmorQuery(id: baseItem.id)
24 | self.item = try await GQLClient.shared.fetch(query: query).getArmor.fragments.armorData
25 | case .weapon:
26 | let query = GQL.GetWeaponQuery(id: baseItem.id)
27 | self.item = try await GQLClient.shared.fetch(query: query).getWeapon.fragments.weaponData
28 | case .talisman:
29 | let query = GQL.GetTalismanQuery(id: baseItem.id)
30 | self.item = try await GQLClient.shared.fetch(query: query).getTalisman.fragments.talismanData
31 | }
32 | } catch {
33 |
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/The Roundtable.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "object": {
3 | "pins": [
4 | {
5 | "package": "Apollo",
6 | "repositoryURL": "https://github.com/apollographql/apollo-ios.git",
7 | "state": {
8 | "branch": null,
9 | "revision": "08a41bad4ebf76ae8e4efebf26862a42084b7786",
10 | "version": "0.51.2"
11 | }
12 | },
13 | {
14 | "package": "Kingfisher",
15 | "repositoryURL": "https://github.com/onevcat/Kingfisher",
16 | "state": {
17 | "branch": null,
18 | "revision": "32e4acdf6971f58f5ad552389cf2d7d016334eaf",
19 | "version": "7.2.0"
20 | }
21 | },
22 | {
23 | "package": "SQLite.swift",
24 | "repositoryURL": "https://github.com/stephencelis/SQLite.swift.git",
25 | "state": {
26 | "branch": null,
27 | "revision": "5f5ad81ac0d0a0f3e56e39e646e8423c617df523",
28 | "version": "0.13.2"
29 | }
30 | },
31 | {
32 | "package": "swift-argument-parser",
33 | "repositoryURL": "https://github.com/apple/swift-argument-parser.git",
34 | "state": {
35 | "branch": null,
36 | "revision": "9564d61b08a5335ae0a36f789a7d71493eacadfc",
37 | "version": "0.3.2"
38 | }
39 | }
40 | ]
41 | },
42 | "version": 1
43 | }
44 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Magic/GQL/Magic.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import ApolloModels
3 |
4 | protocol BaseMagicData {
5 | var id: String { get }
6 | var name: String? { get }
7 | var image: String? { get }
8 | var description: String? { get }
9 | }
10 |
11 | protocol SpellData {
12 | var slots: Int? { get }
13 | var cost: Int? { get }
14 | var effects: String? { get }
15 | var requieredData: [GQL.AttributeEntryData]? { get }
16 | }
17 |
18 | protocol AshOfWarData {
19 | var affinity: String? { get }
20 | var skill: String? { get }
21 | }
22 |
23 | protocol SpriritData {
24 | var hpCost: String? { get }
25 | var fpCost: String? { get }
26 | var effect: String? { get }
27 | }
28 |
29 | extension GQL.SorceryData: BaseMagicData, SpellData {
30 | var requieredData: [GQL.AttributeEntryData]? {
31 | requires?.compactMap{ $0?.fragments.attributeEntryData }
32 | }
33 | }
34 |
35 | extension GQL.IncantationData: BaseMagicData, SpellData {
36 | var requieredData: [GQL.AttributeEntryData]? {
37 | requires?.compactMap{ $0?.fragments.attributeEntryData }
38 | }
39 | }
40 |
41 | extension GQL.AshOfWarData: BaseMagicData, AshOfWarData {}
42 | extension GQL.SpiritData: BaseMagicData, SpriritData {}
43 |
44 |
45 | let previewMagic: GQL.BaseItemData = .init(id: "preview",
46 | image: nil,
47 | name: "preview item",
48 | description: "preview item description")
49 |
--------------------------------------------------------------------------------
/Modules/Features/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version: 5.6
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "Features",
8 | platforms: [
9 | .iOS(.v15),
10 | ],
11 | products: [
12 | .library(name: "Items", targets: ["Items"]),
13 | .library(name: "Magic", targets: ["Magic"]),
14 | .library(name: "World", targets: ["World"]),
15 | .library(name: "Tabbar", targets: ["Tabbar"]),
16 | ],
17 | dependencies: [
18 | .package(name: "Networking", path: "./Networking"),
19 | .package(name: "Models", path: "./Models"),
20 | .package(name: "SharedUI", path: "./SharedUI"),
21 | ],
22 | targets: [
23 | .target(
24 | name: "Tabbar",
25 | dependencies: [
26 | "SharedUI",
27 | "Magic",
28 | "Items",
29 | "World"
30 | ]),
31 | .target(
32 | name: "Magic",
33 | dependencies: ["Networking",
34 | "SharedUI",
35 | .product(name: "ApolloModels", package: "Models"),],
36 | exclude: ["GQL/magic.graphql"]),
37 | .target(
38 | name: "Items",
39 | dependencies: ["Networking",
40 | "SharedUI",
41 | .product(name: "ApolloModels", package: "Models")],
42 | exclude: ["GQL/items.graphql"]),
43 | .target(
44 | name: "World",
45 | dependencies: ["Networking",
46 | "SharedUI",
47 | .product(name: "ApolloModels", package: "Models")],
48 | exclude: ["GQL/world.graphql"]),
49 | ]
50 | )
51 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Magic/UI/MagicDetailView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import ApolloModels
3 | import Kingfisher
4 | import SharedUI
5 |
6 | struct MagicDetailView: View {
7 | let magic: BaseMagicData
8 |
9 | init(magic: BaseMagicData) {
10 | self.magic = magic
11 | }
12 |
13 | var body: some View {
14 | List {
15 | HStack {
16 | Spacer()
17 | KFImage(URL(string: magic.image ?? ""))
18 | .resizable()
19 | .frame(width: 150, height: 150)
20 | Spacer()
21 | }
22 | .listRowBackground(Color.black)
23 | SimpleSection(title: "Description", content: magic.description ?? "")
24 | if let magic = magic as? SpellData {
25 | SimpleSection(title: "Cost", content: "\(magic.cost ?? 0) FP")
26 | SimpleSection(title: "Slots", content: "\(magic.slots ?? 0)")
27 | if let effect = magic.effects {
28 | SimpleSection(title: "Effects", content: effect)
29 | }
30 | if let requiered = magic.requieredData {
31 | AttributeDataSection(title: "Requiere", data: requiered)
32 | }
33 | }
34 | if let magic = magic as? AshOfWarData {
35 | SimpleSection(title: "Affinity", content: magic.affinity ?? "")
36 | SimpleSection(title: "Skill", content: magic.skill ?? "")
37 | }
38 | if let magic = magic as? SpriritData {
39 | SimpleSection(title: "Effect", content: magic.effect ?? "")
40 | if let hPCost = magic.hpCost, Int(hPCost)! > 0 {
41 | SimpleSection(title: "HP Cost", content: hPCost)
42 | }
43 | if let fpCost = magic.fpCost, Int(fpCost)! > 0 {
44 | SimpleSection(title: "FP Cost", content: fpCost)
45 | }
46 | }
47 | }
48 | .listStyle(.insetGrouped)
49 | .navigationTitle(magic.name?.uppercased() ?? "")
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Magic/UI/MagicListView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import SharedUI
3 |
4 | public struct MagicListView: View {
5 | @StateObject var viewModel: MagicListViewModel
6 |
7 | public init() {
8 | _viewModel = StateObject(wrappedValue: .init())
9 | }
10 |
11 | public var body: some View {
12 | NavigationView {
13 | List {
14 | Section {
15 | switch viewModel.state {
16 | case .loading:
17 | Text("Loading...")
18 | .listRowBackground(Color.sky)
19 | case .error:
20 | Text("Error....")
21 | .listRowBackground(Color.sky)
22 | case let .data(magic):
23 | if let currentData = magic[viewModel.selectedTab] {
24 | makeMagicList(magic: currentData)
25 | }
26 | }
27 | } header: {
28 | tabSelectorView
29 | }
30 | }
31 | .listStyle(.plain)
32 | .background(Color.sky)
33 | .navigationTitle("MAGIC")
34 | .task {
35 | viewModel.currentPage = 0
36 | await viewModel.fetchNextMagic()
37 | }
38 | }
39 | }
40 |
41 | private var tabSelectorView: some View {
42 | Picker("selection", selection: $viewModel.selectedTab) {
43 | ForEach(MagicTab.allCases) { tab in
44 | Text(tab.title).tag(tab)
45 | }
46 | }
47 | .pickerStyle(.segmented)
48 | }
49 |
50 | private func makeMagicList(magic: [BaseMagicData]) -> some View {
51 | ForEach(magic, id: \.id) { item in
52 | NavigationLink {
53 | MagicDetailView(magic: item)
54 | } label: {
55 | MagicRowView(magic: item)
56 | }.listRowBackground(Color.sky)
57 | }
58 | }
59 | }
60 |
61 | struct MagicListView_Previews: PreviewProvider {
62 | static var previews: some View {
63 | MagicListView()
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Magic/UI/MagicListViewModel.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import SwiftUI
3 | import ApolloModels
4 | import Networking
5 |
6 | @MainActor
7 | class MagicListViewModel: ObservableObject {
8 | enum Constant {
9 | static let magicPerPage = 100
10 | }
11 | enum State {
12 | case loading, error, data(magic: [MagicTab: [BaseMagicData]])
13 | }
14 |
15 | @Published var state: State = .loading
16 | @Published var isLoadingNextPage = false
17 | @Published var selectedTab: MagicTab = .sorcery
18 |
19 | var currentPage = 0
20 | private var data: [MagicTab: [BaseMagicData]] = [:] {
21 | didSet {
22 | self.state = .data(magic: data)
23 | }
24 | }
25 |
26 | func fetchNextMagic() async {
27 | let query = GQL.GetMagicQuery(page: currentPage, limit: Constant.magicPerPage)
28 | do {
29 | let results = try await GQLClient.shared.fetch(query: query)
30 | let sorceries = results.sorcery?.compactMap{ $0?.fragments.sorceryData } ?? []
31 | let incantion = results.incantation?.compactMap{ $0?.fragments.incantationData } ?? []
32 | let ashOfWar = results.ashOfWar?.compactMap{ $0?.fragments.ashOfWarData } ?? []
33 | let spirit = results.spirit?.compactMap{ $0?.fragments.spiritData } ?? []
34 | if currentPage == 0 {
35 | data = [.sorcery: sorceries,
36 | .incantation: incantion,
37 | .ashOfWar: ashOfWar,
38 | .spirit: spirit]
39 | } else {
40 | var currentData = data
41 | currentData[.sorcery]?.append(contentsOf: sorceries)
42 | currentData[.incantation]?.append(contentsOf: incantion)
43 | currentData[.ashOfWar]?.append(contentsOf: ashOfWar)
44 | currentData[.spirit]?.append(contentsOf: spirit)
45 | data = currentData
46 | }
47 | currentPage += 1
48 | } catch {
49 | state = .error
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Modules/ApolloCodegen/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 | *.ipa
28 | *.dSYM.zip
29 | *.dSYM
30 |
31 | ## Playgrounds
32 | timeline.xctimeline
33 | playground.xcworkspace
34 |
35 | # Swift Package Manager
36 | #
37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
38 | # Packages/
39 | # Package.pins
40 | # Package.resolved
41 | .build/
42 |
43 | # CocoaPods
44 | #
45 | # We recommend against adding the Pods directory to your .gitignore. However
46 | # you should judge for yourself, the pros and cons are mentioned at:
47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
48 | #
49 | # Pods/
50 |
51 | # Carthage
52 | #
53 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
54 | # Carthage/Checkouts
55 |
56 | Carthage/Build
57 |
58 | # fastlane
59 | #
60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
61 | # screenshots whenever they are needed.
62 | # For more information about the recommended setup visit:
63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
64 |
65 | fastlane/report.xml
66 | fastlane/Preview.html
67 | fastlane/screenshots/**/*.png
68 | fastlane/test_output
69 |
70 | # It is recommended to not store the ApolloCLI folder in the git repo.
71 | # It will be reconstructed when needed.
72 |
73 | ApolloCLI/
74 |
--------------------------------------------------------------------------------
/The Roundtable/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "scale" : "1x",
46 | "size" : "20x20"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "scale" : "2x",
51 | "size" : "20x20"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "scale" : "1x",
56 | "size" : "29x29"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "scale" : "2x",
61 | "size" : "29x29"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "scale" : "1x",
66 | "size" : "40x40"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "scale" : "2x",
71 | "size" : "40x40"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "scale" : "1x",
76 | "size" : "76x76"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "scale" : "2x",
81 | "size" : "76x76"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "scale" : "2x",
86 | "size" : "83.5x83.5"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "scale" : "1x",
91 | "size" : "1024x1024"
92 | }
93 | ],
94 | "info" : {
95 | "author" : "xcode",
96 | "version" : 1
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/Readme.md:
--------------------------------------------------------------------------------
1 | # The Roundtable
2 |
3 | >The bustling hub area that exists outside of the Lands Between. A place to mingle with other adventurerers, craftsmen, resupply and discover a trove of blessings and rooms of secrets. [Source](https://eldenring.wiki.fextralife.com/Roundtable+Hold)
4 |
5 | An Elden Ring companion iOS application in SwiftUI.
6 | This is built using this perfect [API](https://eldenring.fanapis.com/api/graphql) from [this repository](https://github.com/deliton/eldenring-api). I can't thank [Deliton](https://github.com/deliton) enough who did all the hard work and motivated me to start this app.
7 |
8 | ## What is it?
9 | This is a companion application for the masterpiece of a video game that is Elden Ring.
10 | In its complete state (one day) it'll feature a searchable index of all the items, sorceries, incantations, creatures, etc... from the game, alongside a map with some easy to use tools for notes taking.
11 | The ideas is not to spoil, but to help you organize your adventures in this vast open world.
12 |
13 | ## Tech
14 | While being a useful app (well not really for now), this is also a good showcase of how I like to buid modern iOS application.
15 | We use a variant of this architecture at [Medium](https://jobs.lever.co/medium).
16 |
17 | * Heavy usage of Swift packages.
18 | * Why? It's easier to build and tests independant features / parts of the app.
19 | * A Networking package which wrap the [Apollo iOS](https://www.apollographql.com/docs/ios/) client into an async / await API.
20 | * A codegen package which is based on [Apollo codegen](https://www.apollographql.com/docs/ios/swift-scripting/) example, which you can run from the Swift command line to generate all GraphQL models in ApolloModels package.
21 | * A SharedUI package which contains all the colors and shared components that are reusable across features packages + within the app.
22 | * Various features oriented packages. (For now only the items feature).
23 | * Fully in SwitUI.
24 | * Heavy use of new Swift features like Concurrency.
25 | * Less is more, how to achieve a good amount of features with the less amount of code possible.
26 |
27 | ## How to use?
28 | For now you just have to clone the repository then build & run the main target.
29 |
30 | ## How to contribute?
31 | At this stage it might be too early, but any contributions is more than welcome!
32 |
33 | To generate newly added .graphql file:
34 |
35 | `cd Modules/Models`
36 | `swift run ApolloCodegen all`
37 |
--------------------------------------------------------------------------------
/Modules/Networking/Sources/Networking/GQLClient.swift:
--------------------------------------------------------------------------------
1 | import Apollo
2 | import Foundation
3 |
4 | public struct GQLClient {
5 | private enum Constants {
6 | static let apiURL = URL(string: "https://eldenring.fanapis.com/api/graphql")!
7 | }
8 |
9 | public enum GQLError: Error {
10 | case serverError(error: Error)
11 | case missingData
12 | }
13 |
14 | static public let shared = GQLClient()
15 |
16 | private let apolloClient: ApolloClient
17 |
18 | private init() {
19 | let store = ApolloStore(cache: InMemoryNormalizedCache())
20 | let provider = DefaultInterceptorProvider(store: store)
21 | let transport = RequestChainNetworkTransport(interceptorProvider: provider,
22 | endpointURL: Constants.apiURL)
23 | self.apolloClient = ApolloClient(networkTransport: transport, store: store)
24 | }
25 |
26 | public func fetch(query: Query,
27 | cachePolicy: CachePolicy = .returnCacheDataElseFetch)
28 | async throws -> Query.Data where Query: GraphQLQuery {
29 | try await withCheckedThrowingContinuation { continuation in
30 | var queryAlreadyCompletedOnce = false
31 | apolloClient.fetch(query: query, cachePolicy: cachePolicy) { result in
32 | guard !queryAlreadyCompletedOnce else { return }
33 | queryAlreadyCompletedOnce = true
34 | switch result {
35 | case let .failure(error):
36 | continuation.resume(throwing: GQLError.serverError(error: error))
37 | case let .success(successResult):
38 | guard let data = successResult.data else {
39 | continuation.resume(throwing: GQLError.missingData)
40 | return
41 | }
42 | continuation.resume(returning: data)
43 | }
44 | }
45 | }
46 | }
47 |
48 | public func mutate(mutation: Mutation) async throws -> Mutation.Data where Mutation: GraphQLMutation {
49 | try await withCheckedThrowingContinuation { continuation in
50 | apolloClient.perform(mutation: mutation) { result in
51 | switch result {
52 | case let .failure(error):
53 | continuation.resume(throwing: GQLError.serverError(error: error))
54 | case let .success(successResult):
55 | guard let data = successResult.data else {
56 | continuation.resume(throwing: GQLError.missingData)
57 | return
58 | }
59 | continuation.resume(returning: data)
60 | }
61 | }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## User settings
6 | xcuserdata/
7 |
8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
9 | *.xcscmblueprint
10 | *.xccheckout
11 |
12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
13 | build/
14 | DerivedData/
15 | *.moved-aside
16 | *.pbxuser
17 | !default.pbxuser
18 | *.mode1v3
19 | !default.mode1v3
20 | *.mode2v3
21 | !default.mode2v3
22 | *.perspectivev3
23 | !default.perspectivev3
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 |
28 | ## App packaging
29 | *.ipa
30 | *.dSYM.zip
31 | *.dSYM
32 |
33 | ## Playgrounds
34 | timeline.xctimeline
35 | playground.xcworkspace
36 |
37 | # Swift Package Manager
38 | #
39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
40 | # Packages/
41 | # Package.pins
42 | # Package.resolved
43 | # *.xcodeproj
44 | #
45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
46 | # hence it is not needed unless you have added a package configuration file to your project
47 | # .swiftpm
48 |
49 | .build/
50 |
51 | # CocoaPods
52 | #
53 | # We recommend against adding the Pods directory to your .gitignore. However
54 | # you should judge for yourself, the pros and cons are mentioned at:
55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
56 | #
57 | # Pods/
58 | #
59 | # Add this line if you want to avoid checking in source code from the Xcode workspace
60 | # *.xcworkspace
61 |
62 | # Carthage
63 | #
64 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
65 | # Carthage/Checkouts
66 |
67 | Carthage/Build/
68 |
69 | # Accio dependency management
70 | Dependencies/
71 | .accio/
72 |
73 | # fastlane
74 | #
75 | # It is recommended to not store the screenshots in the git repo.
76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed.
77 | # For more information about the recommended setup visit:
78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
79 |
80 | fastlane/report.xml
81 | fastlane/Preview.html
82 | fastlane/screenshots/**/*.png
83 | fastlane/test_output
84 |
85 | # Code Injection
86 | #
87 | # After new code Injection tools there's a generated folder /iOSInjectionProject
88 | # https://github.com/johnno1962/injectionforxcode
89 |
90 | iOSInjectionProject/
91 |
92 |
93 | .DS_Store
94 |
95 | Modules/ApolloCodegen/apollo
96 | Modules/ApolloCodegen/apollo.tar.gz
97 | Modules/Models/apollo.tar.gz
98 | Modules/Models/apollo
99 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Items/GQL/items.graphql:
--------------------------------------------------------------------------------
1 | query GetItems($page: Int!, $limit: Int!) {
2 | item(page: $page, limit: $limit) {
3 | ...BaseItemData
4 | }
5 | }
6 |
7 | query GetItem($id: String!) {
8 | getItem(id: $id) {
9 | ...ItemData
10 | }
11 | }
12 |
13 | query GetArmors($page: Int!, $limit: Int!) {
14 | armor(page: $page, limit: $limit) {
15 | ...BaseArmorData
16 | }
17 | }
18 |
19 | query GetArmor($id: String!) {
20 | getArmor(id: $id) {
21 | ...ArmorData
22 | }
23 | }
24 |
25 | query GetWeapons($page: Int!, $limit: Int!) {
26 | weapon(page: $page, limit: $limit) {
27 | ...BaseWeaponData
28 | }
29 | }
30 |
31 | query GetWeapon($id: String!) {
32 | getWeapon(id: $id) {
33 | ...WeaponData
34 | }
35 | }
36 |
37 | query GetTalismans($page: Int!, $limit: Int!) {
38 | talisman(page: $page, limit: $limit) {
39 | ...BaseTalismanData
40 | }
41 | }
42 |
43 | query GetTalisman($id: String!) {
44 | getTalisman(id: $id) {
45 | ...TalismanData
46 | }
47 | }
48 |
49 | query GetSearchItems($query: String!, $page: Int!, $limit: Int!) {
50 | item(page: $page, limit: $limit, search: $query) {
51 | id
52 | name
53 | image
54 | }
55 | armor(page: $page, limit: $limit, search: $query) {
56 | id
57 | name
58 | image
59 | }
60 | weapon(page: $page, limit: $limit, search: $query) {
61 | id
62 | name
63 | image
64 | }
65 | talisman(page: $page, limit: $limit, search: $query) {
66 | id
67 | name
68 | image
69 | }
70 | }
71 |
72 | fragment BaseItemData on Item {
73 | id
74 | image
75 | name
76 | description
77 | }
78 |
79 | fragment BaseArmorData on Armor {
80 | id
81 | image
82 | name
83 | description
84 | }
85 |
86 | fragment BaseWeaponData on Weapon {
87 | id
88 | image
89 | name
90 | description
91 | }
92 |
93 | fragment BaseTalismanData on Talisman {
94 | id
95 | image
96 | name
97 | description
98 | }
99 |
100 | fragment ItemData on Item {
101 | id
102 | image
103 | name
104 | description
105 | type
106 | effect
107 | }
108 |
109 | fragment ArmorData on Armor {
110 | id
111 | image
112 | name
113 | description
114 | weight
115 | resistance {
116 | ...AttributeEntryData
117 | }
118 | dmgNegation {
119 | ...AttributeEntryData
120 | }
121 | }
122 |
123 | fragment WeaponData on Weapon {
124 | id
125 | image
126 | name
127 | description
128 | weight
129 | category
130 | attack {
131 | ...AttributeEntryData
132 | }
133 | defence {
134 | ...AttributeEntryData
135 | }
136 | scalesWith {
137 | ...ScallingEntryData
138 | }
139 | requiredAttributes {
140 | ...AttributeEntryData
141 | }
142 | }
143 |
144 | fragment TalismanData on Talisman {
145 | id
146 | image
147 | name
148 | description
149 | effect
150 | }
151 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Items/UI/ItemsList/ItemsListView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import SharedUI
3 | import Kingfisher
4 |
5 | public struct ItemsListView: View {
6 | @StateObject private var viewModel: ItemsListViewModel
7 |
8 | public init() {
9 | _viewModel = StateObject(wrappedValue: .init())
10 | }
11 |
12 | public var body: some View {
13 | NavigationView {
14 | List {
15 | Section {
16 | switch viewModel.state {
17 | case .loading:
18 | loadingStateView
19 | case let .data(items):
20 | if viewModel.searchText.isEmpty {
21 | makeItemsList(items: items)
22 | } else {
23 | EmptyView()
24 | }
25 | case let .searchData(items):
26 | makeSearchResultsList(items: items)
27 | case .error:
28 | errorView
29 | }
30 | } header: {
31 | if viewModel.searchText.isEmpty {
32 | tabSelectorView
33 | }
34 | }
35 | }
36 | .searchable(text: $viewModel.searchText, prompt: "Search for an item")
37 | .listStyle(.plain)
38 | .navigationTitle(Text("ITEMS"))
39 | .background(Color.sky)
40 | .task {
41 | if viewModel.searchText.isEmpty {
42 | await viewModel.fetchNextBaseItems()
43 | }
44 | }
45 | .refreshable {
46 | viewModel.currentPage = 0
47 | await viewModel.fetchNextBaseItems()
48 | }
49 | }
50 | }
51 |
52 | private var tabSelectorView: some View {
53 | Picker("selection", selection: $viewModel.selectedTab) {
54 | ForEach(ItemTab.allCases) { tab in
55 | Text(tab.title).tag(tab)
56 | }
57 | }
58 | .pickerStyle(.segmented)
59 | }
60 |
61 | private var loadingStateView: some View {
62 | Text("Loading...")
63 | .foregroundColor(.white)
64 | .listRowBackground(Color.sky)
65 | }
66 |
67 | private var errorView: some View {
68 | Text("Error...")
69 | .foregroundColor(.white)
70 | .listRowBackground(Color.sky)
71 | }
72 |
73 | @ViewBuilder
74 | private func makeItemsList(items: [BaseItemData]) -> some View {
75 | ForEach(items, id: \.id) { item in
76 | NavigationLink(destination: ItemDetailView(baseItem: item)) {
77 | ItemsListRowView(item: item)
78 | }
79 | .listRowBackground(Color.sky)
80 | }
81 | if !viewModel.isLoadingNextPage {
82 | Rectangle()
83 | .listRowBackground(Color.sky)
84 | .task {
85 | await viewModel.fetchNextBaseItems()
86 | }
87 | }
88 | }
89 |
90 | private func makeSearchResultsList(items: [SearchResultData]) -> some View {
91 | ForEach(items, id: \.id) { item in
92 | NavigationLink {
93 | if let item = item as? BaseItemData {
94 | ItemDetailView(baseItem: item)
95 | }
96 | } label: {
97 | HStack {
98 | if let imageString = item.image, let imageURL = URL(string: imageString) {
99 | KFImage(imageURL)
100 | .resizable()
101 | .frame(width: 30, height: 30)
102 | }
103 | Text(item.name ?? "")
104 | .foregroundColor(.edtree)
105 | }
106 | }.listRowBackground(Color.sky)
107 | }
108 | }
109 | }
110 |
111 | struct ItemsListView_Previews: PreviewProvider {
112 | static var previews: some View {
113 | ItemsListView()
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/Modules/Models/Sources/ApolloModels/shared.graphql.swift:
--------------------------------------------------------------------------------
1 | // @generated
2 | // This file was automatically generated and should not be edited.
3 |
4 | import Apollo
5 | import Foundation
6 |
7 | /// GQL namespace
8 | public extension GQL {
9 | struct AttributeEntryData: GraphQLFragment {
10 | /// The raw GraphQL definition of this fragment.
11 | public static let fragmentDefinition: String =
12 | """
13 | fragment AttributeEntryData on AttributeEntry {
14 | __typename
15 | name
16 | amount
17 | }
18 | """
19 |
20 | public static let possibleTypes: [String] = ["AttributeEntry"]
21 |
22 | public static var selections: [GraphQLSelection] {
23 | return [
24 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
25 | GraphQLField("name", type: .scalar(String.self)),
26 | GraphQLField("amount", type: .scalar(Int.self)),
27 | ]
28 | }
29 |
30 | public private(set) var resultMap: ResultMap
31 |
32 | public init(unsafeResultMap: ResultMap) {
33 | self.resultMap = unsafeResultMap
34 | }
35 |
36 | public init(name: String? = nil, amount: Int? = nil) {
37 | self.init(unsafeResultMap: ["__typename": "AttributeEntry", "name": name, "amount": amount])
38 | }
39 |
40 | public var __typename: String {
41 | get {
42 | return resultMap["__typename"]! as! String
43 | }
44 | set {
45 | resultMap.updateValue(newValue, forKey: "__typename")
46 | }
47 | }
48 |
49 | public var name: String? {
50 | get {
51 | return resultMap["name"] as? String
52 | }
53 | set {
54 | resultMap.updateValue(newValue, forKey: "name")
55 | }
56 | }
57 |
58 | public var amount: Int? {
59 | get {
60 | return resultMap["amount"] as? Int
61 | }
62 | set {
63 | resultMap.updateValue(newValue, forKey: "amount")
64 | }
65 | }
66 | }
67 |
68 | struct ScallingEntryData: GraphQLFragment {
69 | /// The raw GraphQL definition of this fragment.
70 | public static let fragmentDefinition: String =
71 | """
72 | fragment ScallingEntryData on ScallingEntry {
73 | __typename
74 | name
75 | scalling
76 | }
77 | """
78 |
79 | public static let possibleTypes: [String] = ["ScallingEntry"]
80 |
81 | public static var selections: [GraphQLSelection] {
82 | return [
83 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
84 | GraphQLField("name", type: .scalar(String.self)),
85 | GraphQLField("scalling", type: .scalar(String.self)),
86 | ]
87 | }
88 |
89 | public private(set) var resultMap: ResultMap
90 |
91 | public init(unsafeResultMap: ResultMap) {
92 | self.resultMap = unsafeResultMap
93 | }
94 |
95 | public init(name: String? = nil, scalling: String? = nil) {
96 | self.init(unsafeResultMap: ["__typename": "ScallingEntry", "name": name, "scalling": scalling])
97 | }
98 |
99 | public var __typename: String {
100 | get {
101 | return resultMap["__typename"]! as! String
102 | }
103 | set {
104 | resultMap.updateValue(newValue, forKey: "__typename")
105 | }
106 | }
107 |
108 | public var name: String? {
109 | get {
110 | return resultMap["name"] as? String
111 | }
112 | set {
113 | resultMap.updateValue(newValue, forKey: "name")
114 | }
115 | }
116 |
117 | public var scalling: String? {
118 | get {
119 | return resultMap["scalling"] as? String
120 | }
121 | set {
122 | resultMap.updateValue(newValue, forKey: "scalling")
123 | }
124 | }
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/Modules/Models/Sources/ApolloCodegen/main.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import ApolloCodegenLib
3 | import ArgumentParser
4 |
5 | struct SwiftScript: ParsableCommand {
6 |
7 | static let parentFolderOfScriptFile = FileFinder.findParentFolder()
8 |
9 | static let rootFolderURL = parentFolderOfScriptFile
10 | .apollo.parentFolderURL()
11 | .apollo.parentFolderURL()
12 | .apollo.parentFolderURL()
13 |
14 | static let outputURL = rootFolderURL
15 | .apollo.childFolderURL(folderName:"Models")
16 | .apollo.childFolderURL(folderName:"Sources")
17 | .apollo.childFolderURL(folderName:"ApolloModels")
18 |
19 | static let schemaURL = rootFolderURL
20 | .apollo.childFolderURL(folderName: "Models")
21 | .apollo.childFolderURL(folderName: "Schema")
22 |
23 | static let schemaPath = try! schemaURL.apollo.childFileURL(fileName: "schema.graphqls")
24 |
25 | static var configuration = CommandConfiguration(
26 | abstract: """
27 | A swift-based utility for performing Apollo-related tasks.
28 |
29 | NOTE: If running from a compiled binary, prefix subcommands with `swift-script`. Otherwise use `swift run ApolloCodegen [subcommand]`.
30 | """,
31 | subcommands: [DownloadSchema.self, GenerateCode.self, DownloadSchemaAndGenerateCode.self])
32 |
33 | /// The sub-command to download a schema from a provided endpoint.
34 | struct DownloadSchema: ParsableCommand {
35 | static var configuration = CommandConfiguration(
36 | commandName: "downloadSchema",
37 | abstract: "Downloads the schema with the settings you've set up in the `DownloadSchema` command in `main.swift`.")
38 |
39 | func run() throws {
40 | let endpoint = URL(string: "https://eldenring.fanapis.com/api/graphql")!
41 |
42 | let schemaDownloadOptions = ApolloSchemaDownloadConfiguration(using: .introspection(endpointURL: endpoint),
43 | outputFolderURL: schemaURL)
44 |
45 | try ApolloSchemaDownloader.fetch(with: schemaDownloadOptions)
46 | }
47 | }
48 |
49 | /// The sub-command to actually generate code.
50 | struct GenerateCode: ParsableCommand {
51 | static var configuration = CommandConfiguration(
52 | commandName: "generate",
53 | abstract: "Generates swift code from your schema + your operations based on information set up in the `GenerateCode` command.")
54 |
55 | func run() throws {
56 | let cliFolderURL = rootFolderURL
57 | .apollo.childFolderURL(folderName: "Models")
58 |
59 | let codegenOptions = ApolloCodegenOptions(mergeInFieldsFromFragmentSpreads: false,
60 | namespace: "GQL",
61 | outputFormat: .multipleFiles(inFolderAtURL: outputURL),
62 | customScalarFormat: .passthrough,
63 | urlToSchemaFile: schemaPath)
64 | try ApolloCodegen.run(from: rootFolderURL,
65 | with: cliFolderURL,
66 | options: codegenOptions)
67 | }
68 | }
69 |
70 | /// A sub-command which lets you download the schema then generate swift code.
71 | ///
72 | /// NOTE: This will both take significantly longer than code generation alone and fail when you're offline, so this is not recommended for use in a Run Phase Build script that runs with every build of your project.
73 | struct DownloadSchemaAndGenerateCode: ParsableCommand {
74 | static var configuration = CommandConfiguration(
75 | commandName: "all",
76 | abstract: "Downloads the schema and generates swift code. NOTE: Not recommended for use as part of a Run Phase Build Script.")
77 |
78 | func run() throws {
79 | try DownloadSchema().run()
80 | try GenerateCode().run()
81 | }
82 | }
83 | }
84 |
85 | // This will set up the command and parse the arguments when this executable is run.
86 | SwiftScript.main()
87 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Items/GQL/Items.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import ApolloModels
3 |
4 | enum ItemType {
5 | case item, armor, weapon, talisman
6 | }
7 |
8 | protocol BaseItemData {
9 | var id: String { get }
10 | var name: String? { get }
11 | var image: String? { get }
12 | var description: String? { get }
13 | var itemType: ItemType { get }
14 | }
15 |
16 | protocol SearchResultData {
17 | var id: String { get }
18 | var name: String? { get }
19 | var image: String? { get }
20 | }
21 |
22 | protocol ItemPouchData {
23 | var effect: String? { get }
24 | var type: String? { get }
25 | }
26 |
27 | protocol ArmorItemData {
28 | var weight: Int? { get }
29 | var resistanceData: [GQL.AttributeEntryData]? { get }
30 | var dmgNegationData: [GQL.AttributeEntryData]? { get }
31 | }
32 |
33 | protocol WeaponItemData {
34 | var weight: Int? { get }
35 | var category: String? { get }
36 | var attackData: [GQL.AttributeEntryData]? { get }
37 | var defenceData: [GQL.AttributeEntryData]? { get }
38 | var scallingData: [GQL.ScallingEntryData]? { get }
39 | var requiredAttributesData: [GQL.ScallingEntryData]? { get }
40 | }
41 |
42 | protocol TalismanItemData {
43 | var effect: String? { get }
44 | }
45 |
46 | extension GQL.BaseItemData: BaseItemData {
47 | var itemType: ItemType {
48 | .item
49 | }
50 | }
51 |
52 | extension GQL.ItemData: BaseItemData, ItemPouchData {
53 | var itemType: ItemType {
54 | .item
55 | }
56 | }
57 |
58 | extension GQL.BaseArmorData: BaseItemData {
59 | var itemType: ItemType {
60 | .armor
61 | }
62 | }
63 |
64 | extension GQL.ArmorData: BaseItemData, ArmorItemData {
65 | var itemType: ItemType {
66 | .armor
67 | }
68 |
69 | var resistanceData: [GQL.AttributeEntryData]? {
70 | resistance?.compactMap{ $0?.fragments.attributeEntryData }
71 | }
72 |
73 | var dmgNegationData: [GQL.AttributeEntryData]? {
74 | dmgNegation?.compactMap{ $0?.fragments.attributeEntryData }
75 | }
76 |
77 |
78 | }
79 |
80 | extension GQL.BaseWeaponData: BaseItemData {
81 | var itemType: ItemType {
82 | .weapon
83 | }
84 | }
85 |
86 | extension GQL.WeaponData: BaseItemData, WeaponItemData {
87 | var itemType: ItemType {
88 | .weapon
89 | }
90 |
91 | var attackData: [GQL.AttributeEntryData]? {
92 | attack?.compactMap{ $0?.fragments.attributeEntryData }
93 | }
94 |
95 | var defenceData: [GQL.AttributeEntryData]? {
96 | defence?.compactMap{ $0?.fragments.attributeEntryData }
97 | }
98 |
99 | var scallingData: [GQL.ScallingEntryData]? {
100 | scalesWith?.compactMap{ $0?.fragments.scallingEntryData }
101 | }
102 |
103 | var requiredAttributesData: [GQL.ScallingEntryData]? {
104 | scalesWith?.compactMap{ $0?.fragments.scallingEntryData }
105 | }
106 | }
107 |
108 | extension GQL.BaseTalismanData: BaseItemData {
109 | var itemType: ItemType {
110 | .talisman
111 | }
112 | }
113 |
114 | extension GQL.TalismanData: BaseItemData, TalismanItemData {
115 | var itemType: ItemType {
116 | .talisman
117 | }
118 | }
119 |
120 | extension GQL.GetSearchItemsQuery.Data.Item: SearchResultData, BaseItemData {
121 | var description: String? {
122 | nil
123 | }
124 |
125 | var itemType: ItemType {
126 | .item
127 | }
128 | }
129 | extension GQL.GetSearchItemsQuery.Data.Armor: SearchResultData, BaseItemData {
130 | var description: String? {
131 | nil
132 | }
133 |
134 | var itemType: ItemType {
135 | .armor
136 | }
137 | }
138 | extension GQL.GetSearchItemsQuery.Data.Weapon: SearchResultData, BaseItemData {
139 | var description: String? {
140 | nil
141 | }
142 |
143 | var itemType: ItemType {
144 | .weapon
145 | }
146 | }
147 | extension GQL.GetSearchItemsQuery.Data.Talisman: SearchResultData, BaseItemData {
148 | var description: String? {
149 | nil
150 | }
151 |
152 | var itemType: ItemType {
153 | .talisman
154 | }
155 | }
156 |
157 | let previewItem: GQL.BaseItemData = .init(id: "preview",
158 | image: nil,
159 | name: "preview item",
160 | description: "preview item description")
161 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Items/UI/ItemDetail/ItemDetailView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import ApolloModels
3 | import Kingfisher
4 | import SharedUI
5 |
6 | struct ItemDetailView: View {
7 | @StateObject private var viewModel: ItemDetailViewModel
8 |
9 | init(baseItem: BaseItemData) {
10 | _viewModel = StateObject(wrappedValue: .init(baseItem: baseItem))
11 | }
12 |
13 | var body: some View {
14 | List {
15 | if let item = viewModel.item {
16 | HStack {
17 | Spacer()
18 | KFImage(URL(string: item.image ?? ""))
19 | .resizable()
20 | .frame(width: 150, height: 150)
21 | Spacer()
22 | }
23 | .listRowBackground(Color.black)
24 | makeSection(title: "Description", content: item.description ?? "")
25 | if let item = item as? ItemPouchData {
26 | if let type = item.type {
27 | makeSection(title: "Type", content: type)
28 | }
29 | if let effect = item.effect {
30 | makeSection(title: "Effect", content: effect)
31 | }
32 | } else if let item = item as? ArmorItemData {
33 | if let resistance = item.resistanceData {
34 | makeAttributeDataSection(title: "Resistance", data: resistance)
35 | }
36 | if let dmgNegation = item.resistanceData {
37 | makeAttributeDataSection(title: "Damage negation", data: dmgNegation)
38 | }
39 | } else if let item = item as? WeaponItemData {
40 | if let scalling = item.scallingData {
41 | makeScallingSection(title: "Scalling", data: scalling)
42 | }
43 | if let attributes = item.requiredAttributesData {
44 | makeScallingSection(title: "Requiered attributes", data: attributes)
45 | }
46 | if let attack = item.attackData {
47 | makeAttributeDataSection(title: "Attack", data: attack)
48 | }
49 | if let defence = item.defenceData {
50 | makeAttributeDataSection(title: "Defence", data: defence)
51 | }
52 | } else if let item = item as? TalismanItemData {
53 | if let effect = item.effect {
54 | makeSection(title: "Effect", content: effect)
55 | }
56 | }
57 | } else {
58 | Text("Loading...")
59 | }
60 | }
61 | .task {
62 | await viewModel.fetchItemData()
63 | }
64 | .listStyle(.insetGrouped)
65 | .navigationTitle(viewModel.item?.name?.uppercased() ?? "")
66 | }
67 |
68 | private func makeSectionTitle(title: String) -> some View {
69 | Text(title.uppercased())
70 | .font(.mantinia(size: 14))
71 | .foregroundColor(.white)
72 | }
73 |
74 | private func makeSection(title: String, content: String) -> some View {
75 | Section {
76 | Text(content)
77 | .font(.body)
78 | .foregroundColor(.white)
79 | .listRowBackground(Color.sky)
80 | } header: {
81 | makeSectionTitle(title: title)
82 | }
83 | }
84 |
85 | private func makeAttributeDataSection(title: String, data: [GQL.AttributeEntryData]) -> some View {
86 | Section {
87 | VStack {
88 | ForEach(data, id: \.name) { attribute in
89 | HStack {
90 | Text(attribute.name ?? "")
91 | Spacer()
92 | Text("\(attribute.amount ?? 0)")
93 | }
94 | Divider()
95 | }
96 | }
97 | .listRowBackground(Color.sky)
98 | } header: {
99 | makeSectionTitle(title: title)
100 | }
101 | }
102 |
103 | private func makeScallingSection(title: String, data: [GQL.ScallingEntryData]) -> some View {
104 | Section {
105 | VStack {
106 | ForEach(data, id: \.name) { attribute in
107 | HStack {
108 | Text(attribute.name ?? "")
109 | Spacer()
110 | Text(attribute.scalling ?? "")
111 | }
112 | Divider()
113 | }
114 | }
115 | .listRowBackground(Color.sky)
116 | } header: {
117 | makeSectionTitle(title: title)
118 | }
119 | }
120 | }
121 |
122 | struct SwiftUIView_Previews: PreviewProvider {
123 | static var previews: some View {
124 | ItemDetailView(baseItem: previewItem)
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/Modules/Features/Sources/Items/UI/ItemsList/ItemsListViewModel.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import Foundation
3 | import Networking
4 | import ApolloModels
5 | import Apollo
6 | import Combine
7 |
8 | @MainActor
9 | class ItemsListViewModel: ObservableObject {
10 | enum Constants {
11 | static let itemsPerPage = 100
12 | }
13 |
14 | enum State {
15 | case loading, data(items: [BaseItemData]), searchData(items: [SearchResultData]), error
16 | }
17 |
18 | @Published var state: State = .loading
19 | @Published var isLoadingNextPage = false
20 | @Published var searchText: String = "" {
21 | didSet{
22 | if searchText.isEmpty {
23 | selectedTab = .items
24 | }
25 | }
26 | }
27 |
28 | @Published var selectedTab: ItemTab = .items {
29 | didSet {
30 | state = .loading
31 | currentPage = 0
32 | Task {
33 | await fetchNextBaseItems()
34 | }
35 | }
36 | }
37 |
38 | private var cancellableSet: Set = Set()
39 | private var datasource: [BaseItemData] = []
40 | var currentPage = 0
41 |
42 | init() {
43 | _searchText
44 | .projectedValue
45 | .debounce(for: .seconds(0.2), scheduler: RunLoop.main)
46 | .sink { [weak self] search in
47 | guard let self = self else { return }
48 | if !search.isEmpty {
49 | self.currentPage = 0
50 | Task {
51 | await self.fetchSearchItem(query: search)
52 | }
53 | }
54 | }
55 | .store(in: &cancellableSet)
56 | }
57 |
58 | func fetchNextBaseItems() async {
59 | if currentPage > 0 {
60 | isLoadingNextPage = true
61 | }
62 | switch selectedTab {
63 | case .items:
64 | await fetchNextItems()
65 | case .armor:
66 | await fetchNextArmors()
67 | case .weapon:
68 | await fetchNextWeapons()
69 | case .talisman:
70 | await fetchNextTalismans()
71 | }
72 | }
73 |
74 | func fetchSearchItem(query: String) async {
75 | let query = GQL.GetSearchItemsQuery(query: query, page: 0, limit: 15)
76 | do {
77 | var searchResults: [SearchResultData] = []
78 | let results = try await GQLClient.shared.fetch(query: query, cachePolicy: .returnCacheDataElseFetch)
79 | searchResults.append(contentsOf: results.item?.compactMap{ $0 } ?? [])
80 | searchResults.append(contentsOf: results.armor?.compactMap{ $0 } ?? [])
81 | searchResults.append(contentsOf: results.weapon?.compactMap{ $0 } ?? [])
82 | searchResults.append(contentsOf: results.talisman?.compactMap{ $0 } ?? [])
83 | state = .searchData(items: searchResults)
84 | } catch {
85 | state = .error
86 | }
87 | }
88 |
89 | private func fetchNextItems() async {
90 | let query = GQL.GetItemsQuery(page: currentPage, limit: Constants.itemsPerPage)
91 | processItems(items: await processQuery(query: query)?.item?.compactMap{ $0?.fragments.baseItemData } )
92 | }
93 |
94 | private func fetchNextArmors() async {
95 | let query = GQL.GetArmorsQuery(page: currentPage, limit: Constants.itemsPerPage)
96 | processItems(items: await processQuery(query: query)?.armor?.compactMap{ $0?.fragments.baseArmorData } )
97 | }
98 |
99 | private func fetchNextWeapons() async {
100 | let query = GQL.GetWeaponsQuery(page: currentPage, limit: Constants.itemsPerPage)
101 | processItems(items: await processQuery(query: query)?.weapon?.compactMap{ $0?.fragments.baseWeaponData } )
102 | }
103 |
104 | private func fetchNextTalismans() async {
105 | let query = GQL.GetTalismansQuery(page: currentPage, limit: Constants.itemsPerPage)
106 | processItems(items: await processQuery(query: query)?.talisman?.compactMap{ $0?.fragments.baseTalismanData } )
107 | }
108 |
109 | private func processQuery(query: Query) async -> Query.Data? where Query: GraphQLQuery {
110 | do {
111 | return try await GQLClient.shared.fetch(query: query)
112 | } catch {
113 | self.state = .error
114 | return nil
115 | }
116 | }
117 |
118 | private func processItems(items: [BaseItemData]?) {
119 | guard let items = items else {
120 | state = .error
121 | return
122 | }
123 |
124 | if currentPage == 0 {
125 | datasource = items
126 | } else {
127 | datasource.append(contentsOf: items)
128 | }
129 | state = .data(items: datasource)
130 | isLoadingNextPage = false
131 | currentPage += 1
132 | }
133 | }
134 |
--------------------------------------------------------------------------------
/Modules/Models/Schema/schema.graphqls:
--------------------------------------------------------------------------------
1 | type ScallingEntry {
2 | scalling: String
3 | name: String
4 | }
5 |
6 | type AttributeEntry {
7 | amount: Int
8 | name: String
9 | }
10 |
11 | type Ammo {
12 | id: ID!
13 | name: String
14 | image: String
15 | description: String
16 | type: String
17 | attackPower: [AttributeEntry]
18 | passive: String
19 | }
20 |
21 | type Armor {
22 | id: ID!
23 | name: String
24 | image: String
25 | description: String
26 | category: String
27 | dmgNegation: [AttributeEntry]
28 | resistance: [AttributeEntry]
29 | weight: Int
30 | }
31 |
32 | type AshOfWar {
33 | id: ID!
34 | name: String
35 | image: String
36 | description: String
37 | affinity: String
38 | skill: String
39 | }
40 |
41 | type Boss {
42 | id: ID!
43 | name: String
44 | image: String
45 | description: String
46 | location: String
47 | drops: [String]
48 | healthPoints: String
49 | }
50 |
51 | type ClassStats {
52 | level: String
53 | vigor: String
54 | mind: String
55 | endurance: String
56 | strenght: String
57 | dexterity: String
58 | inteligence: String
59 | faith: String
60 | arcane: String
61 | }
62 |
63 | type Class {
64 | id: ID!
65 | name: String
66 | image: String
67 | description: String
68 | stats: [ClassStats]
69 | }
70 |
71 | type Creature {
72 | id: ID!
73 | name: String
74 | image: String
75 | description: String
76 | location: String
77 | drops: [String]
78 | }
79 |
80 | type Incantation {
81 | id: ID!
82 | name: String
83 | image: String
84 | description: String
85 | type: String
86 | cost: Int
87 | slots: Int
88 | effects: String
89 | requires: [AttributeEntry]
90 | }
91 |
92 | type Item {
93 | id: ID!
94 | name: String
95 | image: String
96 | description: String
97 | effect: String
98 | type: String
99 | }
100 |
101 | type Location {
102 | id: ID!
103 | name: String
104 | image: String
105 | description: String
106 | }
107 |
108 | type Npc {
109 | id: ID!
110 | name: String
111 | image: String
112 | description: String
113 | quote: String
114 | location: String
115 | role: String
116 | }
117 |
118 | type Shield {
119 | id: ID!
120 | name: String
121 | image: String
122 | description: String
123 | attack: [AttributeEntry]
124 | defence: [AttributeEntry]
125 | scalesWith: [ScallingEntry]
126 | requiredAttributes: [AttributeEntry]
127 | category: String
128 | weight: Int
129 | }
130 |
131 | type Sorcery {
132 | id: ID!
133 | name: String
134 | image: String
135 | description: String
136 | type: String
137 | cost: Int
138 | slots: Int
139 | effects: String
140 | requires: [AttributeEntry]
141 | }
142 |
143 | type Spirit {
144 | id: ID!
145 | name: String
146 | image: String
147 | description: String
148 | fpCost: String
149 | hpCost: String
150 | effect: String
151 | }
152 |
153 | type Talisman {
154 | id: ID!
155 | name: String
156 | image: String
157 | description: String
158 | effect: String
159 | }
160 |
161 | type Weapon {
162 | id: ID!
163 | name: String
164 | image: String
165 | description: String
166 | attack: [AttributeEntry]
167 | defence: [AttributeEntry]
168 | scalesWith: [ScallingEntry]
169 | requiredAttributes: [AttributeEntry]
170 | category: String
171 | weight: Int
172 | }
173 |
174 | type Query {
175 | ammo(id: ID, name: String, description: String, type: String, passive: String, page: Int = 0, limit: Int, search: String): [Ammo]
176 | getAmmo(id: String!): Ammo!
177 | armor(id: ID, name: String, description: String, category: String, weight: Int, page: Int = 0, limit: Int, search: String): [Armor]
178 | getArmor(id: String!): Armor!
179 | ashOfWar(id: ID, name: String, description: String, affinity: String, skill: String, page: Int = 0, limit: Int, search: String): [AshOfWar]
180 | getAshOfWar(id: String!): AshOfWar!
181 | boss(id: ID, name: String, description: String, location: String, healthPoints: String, page: Int = 0, limit: Int, search: String): [Boss]
182 | getBoss(id: String!): Boss!
183 | class(id: ID, name: String, description: String, page: Int = 0, limit: Int, search: String): [Class]
184 | getClass(id: String!): Class!
185 | creature(id: ID, name: String, description: String, location: String, page: Int = 0, limit: Int, search: String): [Creature]
186 | getCreature(id: String!): Creature!
187 | incantation(id: ID, name: String, description: String, type: String, cost: Int, slots: Int, page: Int = 0, limit: Int, search: String): [Incantation]
188 | getIncantation(id: String!): Incantation!
189 | item(id: ID, name: String, description: String, effect: String, page: Int = 0, limit: Int, search: String): [Item]
190 | getItem(id: String!): Item!
191 | location(id: ID, name: String, description: String, page: Int = 0, limit: Int, search: String): [Location]
192 | getLocation(id: String!): Location!
193 | npc(id: ID, name: String, description: String, quote: String, location: String, role: String, page: Int = 0, limit: Int, search: String): [Npc]
194 | getNpc(id: String!): Npc!
195 | shield(id: ID, name: String, description: String, category: String, weight: Int, page: Int = 0, limit: Int, search: String): [Shield]
196 | getShield(id: String!): Shield!
197 | sorcery(id: ID, name: String, description: String, type: String, cost: Int, slots: Int, page: Int = 0, limit: Int, search: String): [Sorcery]
198 | getSorcery(id: String!): Sorcery!
199 | spirit(id: ID, name: String, description: String, fpCost: String, hpCost: String, effect: String, page: Int = 0, limit: Int, search: String): [Spirit]
200 | getSpirit(id: String!): Spirit!
201 | talisman(id: ID, name: String, description: String, effect: String, page: Int = 0, limit: Int, search: String): [Talisman]
202 | getTalisman(id: String!): Talisman!
203 | weapon(id: ID, name: String, description: String, category: String, weight: Int, page: Int = 0, limit: Int, search: String): [Weapon]
204 | getWeapon(id: String!): Weapon!
205 | }
206 |
--------------------------------------------------------------------------------
/The Roundtable.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 55;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 9F61913A27E8B89700D472EA /* SharedUI in Frameworks */ = {isa = PBXBuildFile; productRef = 9F61913927E8B89700D472EA /* SharedUI */; };
11 | 9FA3EB2427EB07D100239BC4 /* Tabbar in Frameworks */ = {isa = PBXBuildFile; productRef = 9FA3EB2327EB07D100239BC4 /* Tabbar */; };
12 | 9FD834B327E86D34000D98C3 /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD834B227E86D34000D98C3 /* App.swift */; };
13 | 9FD834B727E86D36000D98C3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9FD834B627E86D36000D98C3 /* Assets.xcassets */; };
14 | 9FD834BA27E86D36000D98C3 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9FD834B927E86D36000D98C3 /* Preview Assets.xcassets */; };
15 | /* End PBXBuildFile section */
16 |
17 | /* Begin PBXFileReference section */
18 | 9F1AC1D927EAFD11003A1A95 /* Models */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Models; path = Modules/Models; sourceTree = ""; };
19 | 9F3E6EDB27E8B5AD0010A341 /* SharedUI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = SharedUI; path = Modules/SharedUI; sourceTree = ""; };
20 | 9FCC570827EB04AD00050ED0 /* Features */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Features; path = Modules/Features; sourceTree = ""; };
21 | 9FD834AF27E86D34000D98C3 /* The Roundtable.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "The Roundtable.app"; sourceTree = BUILT_PRODUCTS_DIR; };
22 | 9FD834B227E86D34000D98C3 /* App.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App.swift; sourceTree = ""; };
23 | 9FD834B627E86D36000D98C3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
24 | 9FD834B927E86D36000D98C3 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
25 | 9FD834C027E86E85000D98C3 /* Networking */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Networking; path = Modules/Networking; sourceTree = ""; };
26 | /* End PBXFileReference section */
27 |
28 | /* Begin PBXFrameworksBuildPhase section */
29 | 9FD834AC27E86D34000D98C3 /* Frameworks */ = {
30 | isa = PBXFrameworksBuildPhase;
31 | buildActionMask = 2147483647;
32 | files = (
33 | 9FA3EB2427EB07D100239BC4 /* Tabbar in Frameworks */,
34 | 9F61913A27E8B89700D472EA /* SharedUI in Frameworks */,
35 | );
36 | runOnlyForDeploymentPostprocessing = 0;
37 | };
38 | /* End PBXFrameworksBuildPhase section */
39 |
40 | /* Begin PBXGroup section */
41 | 9FADB98427E8846C00447FAB /* Frameworks */ = {
42 | isa = PBXGroup;
43 | children = (
44 | );
45 | name = Frameworks;
46 | sourceTree = "";
47 | };
48 | 9FD834A627E86D34000D98C3 = {
49 | isa = PBXGroup;
50 | children = (
51 | 9FD834B127E86D34000D98C3 /* The Roundtable */,
52 | 9F1AC1D927EAFD11003A1A95 /* Models */,
53 | 9FD834C027E86E85000D98C3 /* Networking */,
54 | 9F3E6EDB27E8B5AD0010A341 /* SharedUI */,
55 | 9FCC570827EB04AD00050ED0 /* Features */,
56 | 9FD834B027E86D34000D98C3 /* Products */,
57 | 9FADB98427E8846C00447FAB /* Frameworks */,
58 | );
59 | sourceTree = "";
60 | };
61 | 9FD834B027E86D34000D98C3 /* Products */ = {
62 | isa = PBXGroup;
63 | children = (
64 | 9FD834AF27E86D34000D98C3 /* The Roundtable.app */,
65 | );
66 | name = Products;
67 | sourceTree = "";
68 | };
69 | 9FD834B127E86D34000D98C3 /* The Roundtable */ = {
70 | isa = PBXGroup;
71 | children = (
72 | 9FD834B227E86D34000D98C3 /* App.swift */,
73 | 9FD834B627E86D36000D98C3 /* Assets.xcassets */,
74 | 9FD834B827E86D36000D98C3 /* Preview Content */,
75 | );
76 | path = "The Roundtable";
77 | sourceTree = "";
78 | };
79 | 9FD834B827E86D36000D98C3 /* Preview Content */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 9FD834B927E86D36000D98C3 /* Preview Assets.xcassets */,
83 | );
84 | path = "Preview Content";
85 | sourceTree = "";
86 | };
87 | /* End PBXGroup section */
88 |
89 | /* Begin PBXNativeTarget section */
90 | 9FD834AE27E86D34000D98C3 /* The Roundtable */ = {
91 | isa = PBXNativeTarget;
92 | buildConfigurationList = 9FD834BD27E86D36000D98C3 /* Build configuration list for PBXNativeTarget "The Roundtable" */;
93 | buildPhases = (
94 | 9FD834AB27E86D34000D98C3 /* Sources */,
95 | 9FD834AC27E86D34000D98C3 /* Frameworks */,
96 | 9FD834AD27E86D34000D98C3 /* Resources */,
97 | );
98 | buildRules = (
99 | );
100 | dependencies = (
101 | );
102 | name = "The Roundtable";
103 | packageProductDependencies = (
104 | 9F61913927E8B89700D472EA /* SharedUI */,
105 | 9FA3EB2327EB07D100239BC4 /* Tabbar */,
106 | );
107 | productName = "The Roundtable";
108 | productReference = 9FD834AF27E86D34000D98C3 /* The Roundtable.app */;
109 | productType = "com.apple.product-type.application";
110 | };
111 | /* End PBXNativeTarget section */
112 |
113 | /* Begin PBXProject section */
114 | 9FD834A727E86D34000D98C3 /* Project object */ = {
115 | isa = PBXProject;
116 | attributes = {
117 | BuildIndependentTargetsInParallel = 1;
118 | LastSwiftUpdateCheck = 1330;
119 | LastUpgradeCheck = 1330;
120 | TargetAttributes = {
121 | 9FD834AE27E86D34000D98C3 = {
122 | CreatedOnToolsVersion = 13.3;
123 | };
124 | };
125 | };
126 | buildConfigurationList = 9FD834AA27E86D34000D98C3 /* Build configuration list for PBXProject "The Roundtable" */;
127 | compatibilityVersion = "Xcode 13.0";
128 | developmentRegion = en;
129 | hasScannedForEncodings = 0;
130 | knownRegions = (
131 | en,
132 | Base,
133 | );
134 | mainGroup = 9FD834A627E86D34000D98C3;
135 | productRefGroup = 9FD834B027E86D34000D98C3 /* Products */;
136 | projectDirPath = "";
137 | projectRoot = "";
138 | targets = (
139 | 9FD834AE27E86D34000D98C3 /* The Roundtable */,
140 | );
141 | };
142 | /* End PBXProject section */
143 |
144 | /* Begin PBXResourcesBuildPhase section */
145 | 9FD834AD27E86D34000D98C3 /* Resources */ = {
146 | isa = PBXResourcesBuildPhase;
147 | buildActionMask = 2147483647;
148 | files = (
149 | 9FD834BA27E86D36000D98C3 /* Preview Assets.xcassets in Resources */,
150 | 9FD834B727E86D36000D98C3 /* Assets.xcassets in Resources */,
151 | );
152 | runOnlyForDeploymentPostprocessing = 0;
153 | };
154 | /* End PBXResourcesBuildPhase section */
155 |
156 | /* Begin PBXSourcesBuildPhase section */
157 | 9FD834AB27E86D34000D98C3 /* Sources */ = {
158 | isa = PBXSourcesBuildPhase;
159 | buildActionMask = 2147483647;
160 | files = (
161 | 9FD834B327E86D34000D98C3 /* App.swift in Sources */,
162 | );
163 | runOnlyForDeploymentPostprocessing = 0;
164 | };
165 | /* End PBXSourcesBuildPhase section */
166 |
167 | /* Begin XCBuildConfiguration section */
168 | 9FD834BB27E86D36000D98C3 /* Debug */ = {
169 | isa = XCBuildConfiguration;
170 | buildSettings = {
171 | ALWAYS_SEARCH_USER_PATHS = NO;
172 | CLANG_ANALYZER_NONNULL = YES;
173 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
174 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
175 | CLANG_ENABLE_MODULES = YES;
176 | CLANG_ENABLE_OBJC_ARC = YES;
177 | CLANG_ENABLE_OBJC_WEAK = YES;
178 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
179 | CLANG_WARN_BOOL_CONVERSION = YES;
180 | CLANG_WARN_COMMA = YES;
181 | CLANG_WARN_CONSTANT_CONVERSION = YES;
182 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
183 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
184 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
185 | CLANG_WARN_EMPTY_BODY = YES;
186 | CLANG_WARN_ENUM_CONVERSION = YES;
187 | CLANG_WARN_INFINITE_RECURSION = YES;
188 | CLANG_WARN_INT_CONVERSION = YES;
189 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
190 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
191 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
192 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
193 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
194 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
195 | CLANG_WARN_STRICT_PROTOTYPES = YES;
196 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
197 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
198 | CLANG_WARN_UNREACHABLE_CODE = YES;
199 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
200 | COPY_PHASE_STRIP = NO;
201 | DEBUG_INFORMATION_FORMAT = dwarf;
202 | ENABLE_STRICT_OBJC_MSGSEND = YES;
203 | ENABLE_TESTABILITY = YES;
204 | GCC_C_LANGUAGE_STANDARD = gnu11;
205 | GCC_DYNAMIC_NO_PIC = NO;
206 | GCC_NO_COMMON_BLOCKS = YES;
207 | GCC_OPTIMIZATION_LEVEL = 0;
208 | GCC_PREPROCESSOR_DEFINITIONS = (
209 | "DEBUG=1",
210 | "$(inherited)",
211 | );
212 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
213 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
214 | GCC_WARN_UNDECLARED_SELECTOR = YES;
215 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
216 | GCC_WARN_UNUSED_FUNCTION = YES;
217 | GCC_WARN_UNUSED_VARIABLE = YES;
218 | IPHONEOS_DEPLOYMENT_TARGET = 15.4;
219 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
220 | MTL_FAST_MATH = YES;
221 | ONLY_ACTIVE_ARCH = YES;
222 | SDKROOT = iphoneos;
223 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
224 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
225 | };
226 | name = Debug;
227 | };
228 | 9FD834BC27E86D36000D98C3 /* Release */ = {
229 | isa = XCBuildConfiguration;
230 | buildSettings = {
231 | ALWAYS_SEARCH_USER_PATHS = NO;
232 | CLANG_ANALYZER_NONNULL = YES;
233 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
234 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
235 | CLANG_ENABLE_MODULES = YES;
236 | CLANG_ENABLE_OBJC_ARC = YES;
237 | CLANG_ENABLE_OBJC_WEAK = YES;
238 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
239 | CLANG_WARN_BOOL_CONVERSION = YES;
240 | CLANG_WARN_COMMA = YES;
241 | CLANG_WARN_CONSTANT_CONVERSION = YES;
242 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
243 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
244 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
245 | CLANG_WARN_EMPTY_BODY = YES;
246 | CLANG_WARN_ENUM_CONVERSION = YES;
247 | CLANG_WARN_INFINITE_RECURSION = YES;
248 | CLANG_WARN_INT_CONVERSION = YES;
249 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
250 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
251 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
252 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
253 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
254 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
255 | CLANG_WARN_STRICT_PROTOTYPES = YES;
256 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
257 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
258 | CLANG_WARN_UNREACHABLE_CODE = YES;
259 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
260 | COPY_PHASE_STRIP = NO;
261 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
262 | ENABLE_NS_ASSERTIONS = NO;
263 | ENABLE_STRICT_OBJC_MSGSEND = YES;
264 | GCC_C_LANGUAGE_STANDARD = gnu11;
265 | GCC_NO_COMMON_BLOCKS = YES;
266 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
267 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
268 | GCC_WARN_UNDECLARED_SELECTOR = YES;
269 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
270 | GCC_WARN_UNUSED_FUNCTION = YES;
271 | GCC_WARN_UNUSED_VARIABLE = YES;
272 | IPHONEOS_DEPLOYMENT_TARGET = 15.4;
273 | MTL_ENABLE_DEBUG_INFO = NO;
274 | MTL_FAST_MATH = YES;
275 | SDKROOT = iphoneos;
276 | SWIFT_COMPILATION_MODE = wholemodule;
277 | SWIFT_OPTIMIZATION_LEVEL = "-O";
278 | VALIDATE_PRODUCT = YES;
279 | };
280 | name = Release;
281 | };
282 | 9FD834BE27E86D36000D98C3 /* Debug */ = {
283 | isa = XCBuildConfiguration;
284 | buildSettings = {
285 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
286 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
287 | CODE_SIGN_STYLE = Automatic;
288 | CURRENT_PROJECT_VERSION = 1;
289 | DEVELOPMENT_ASSET_PATHS = "\"The Roundtable/Preview Content\"";
290 | DEVELOPMENT_TEAM = Z6P74P6T99;
291 | ENABLE_PREVIEWS = YES;
292 | GENERATE_INFOPLIST_FILE = YES;
293 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
294 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
295 | INFOPLIST_KEY_UILaunchScreen_Generation = YES;
296 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
297 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
298 | LD_RUNPATH_SEARCH_PATHS = (
299 | "$(inherited)",
300 | "@executable_path/Frameworks",
301 | );
302 | MARKETING_VERSION = 1.0;
303 | PRODUCT_BUNDLE_IDENTIFIER = "com.thomas.The-Roundtable";
304 | PRODUCT_NAME = "$(TARGET_NAME)";
305 | SWIFT_EMIT_LOC_STRINGS = YES;
306 | SWIFT_VERSION = 5.0;
307 | TARGETED_DEVICE_FAMILY = "1,2";
308 | };
309 | name = Debug;
310 | };
311 | 9FD834BF27E86D36000D98C3 /* Release */ = {
312 | isa = XCBuildConfiguration;
313 | buildSettings = {
314 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
315 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
316 | CODE_SIGN_STYLE = Automatic;
317 | CURRENT_PROJECT_VERSION = 1;
318 | DEVELOPMENT_ASSET_PATHS = "\"The Roundtable/Preview Content\"";
319 | DEVELOPMENT_TEAM = Z6P74P6T99;
320 | ENABLE_PREVIEWS = YES;
321 | GENERATE_INFOPLIST_FILE = YES;
322 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
323 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
324 | INFOPLIST_KEY_UILaunchScreen_Generation = YES;
325 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
326 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
327 | LD_RUNPATH_SEARCH_PATHS = (
328 | "$(inherited)",
329 | "@executable_path/Frameworks",
330 | );
331 | MARKETING_VERSION = 1.0;
332 | PRODUCT_BUNDLE_IDENTIFIER = "com.thomas.The-Roundtable";
333 | PRODUCT_NAME = "$(TARGET_NAME)";
334 | SWIFT_EMIT_LOC_STRINGS = YES;
335 | SWIFT_VERSION = 5.0;
336 | TARGETED_DEVICE_FAMILY = "1,2";
337 | };
338 | name = Release;
339 | };
340 | /* End XCBuildConfiguration section */
341 |
342 | /* Begin XCConfigurationList section */
343 | 9FD834AA27E86D34000D98C3 /* Build configuration list for PBXProject "The Roundtable" */ = {
344 | isa = XCConfigurationList;
345 | buildConfigurations = (
346 | 9FD834BB27E86D36000D98C3 /* Debug */,
347 | 9FD834BC27E86D36000D98C3 /* Release */,
348 | );
349 | defaultConfigurationIsVisible = 0;
350 | defaultConfigurationName = Release;
351 | };
352 | 9FD834BD27E86D36000D98C3 /* Build configuration list for PBXNativeTarget "The Roundtable" */ = {
353 | isa = XCConfigurationList;
354 | buildConfigurations = (
355 | 9FD834BE27E86D36000D98C3 /* Debug */,
356 | 9FD834BF27E86D36000D98C3 /* Release */,
357 | );
358 | defaultConfigurationIsVisible = 0;
359 | defaultConfigurationName = Release;
360 | };
361 | /* End XCConfigurationList section */
362 |
363 | /* Begin XCSwiftPackageProductDependency section */
364 | 9F61913927E8B89700D472EA /* SharedUI */ = {
365 | isa = XCSwiftPackageProductDependency;
366 | productName = SharedUI;
367 | };
368 | 9FA3EB2327EB07D100239BC4 /* Tabbar */ = {
369 | isa = XCSwiftPackageProductDependency;
370 | productName = Tabbar;
371 | };
372 | /* End XCSwiftPackageProductDependency section */
373 | };
374 | rootObject = 9FD834A727E86D34000D98C3 /* Project object */;
375 | }
376 |
--------------------------------------------------------------------------------
/Modules/Models/Sources/ApolloModels/world.graphql.swift:
--------------------------------------------------------------------------------
1 | // @generated
2 | // This file was automatically generated and should not be edited.
3 |
4 | import Apollo
5 | import Foundation
6 |
7 | /// GQL namespace
8 | public extension GQL {
9 | final class GetWorldQuery: GraphQLQuery {
10 | /// The raw GraphQL definition of this operation.
11 | public let operationDefinition: String =
12 | """
13 | query GetWorld($page: Int!, $limit: Int!) {
14 | npc(page: $page, limit: $limit) {
15 | __typename
16 | ...NPCData
17 | }
18 | boss(page: $page, limit: $limit) {
19 | __typename
20 | ...BossData
21 | }
22 | creature(page: $page, limit: $limit) {
23 | __typename
24 | ...CreatureData
25 | }
26 | }
27 | """
28 |
29 | public let operationName: String = "GetWorld"
30 |
31 | public var queryDocument: String {
32 | var document: String = operationDefinition
33 | document.append("\n" + NpcData.fragmentDefinition)
34 | document.append("\n" + BossData.fragmentDefinition)
35 | document.append("\n" + CreatureData.fragmentDefinition)
36 | return document
37 | }
38 |
39 | public var page: Int
40 | public var limit: Int
41 |
42 | public init(page: Int, limit: Int) {
43 | self.page = page
44 | self.limit = limit
45 | }
46 |
47 | public var variables: GraphQLMap? {
48 | return ["page": page, "limit": limit]
49 | }
50 |
51 | public struct Data: GraphQLSelectionSet {
52 | public static let possibleTypes: [String] = ["Query"]
53 |
54 | public static var selections: [GraphQLSelection] {
55 | return [
56 | GraphQLField("npc", arguments: ["page": GraphQLVariable("page"), "limit": GraphQLVariable("limit")], type: .list(.object(Npc.selections))),
57 | GraphQLField("boss", arguments: ["page": GraphQLVariable("page"), "limit": GraphQLVariable("limit")], type: .list(.object(Boss.selections))),
58 | GraphQLField("creature", arguments: ["page": GraphQLVariable("page"), "limit": GraphQLVariable("limit")], type: .list(.object(Creature.selections))),
59 | ]
60 | }
61 |
62 | public private(set) var resultMap: ResultMap
63 |
64 | public init(unsafeResultMap: ResultMap) {
65 | self.resultMap = unsafeResultMap
66 | }
67 |
68 | public init(npc: [Npc?]? = nil, boss: [Boss?]? = nil, creature: [Creature?]? = nil) {
69 | self.init(unsafeResultMap: ["__typename": "Query", "npc": npc.flatMap { (value: [Npc?]) -> [ResultMap?] in value.map { (value: Npc?) -> ResultMap? in value.flatMap { (value: Npc) -> ResultMap in value.resultMap } } }, "boss": boss.flatMap { (value: [Boss?]) -> [ResultMap?] in value.map { (value: Boss?) -> ResultMap? in value.flatMap { (value: Boss) -> ResultMap in value.resultMap } } }, "creature": creature.flatMap { (value: [Creature?]) -> [ResultMap?] in value.map { (value: Creature?) -> ResultMap? in value.flatMap { (value: Creature) -> ResultMap in value.resultMap } } }])
70 | }
71 |
72 | public var npc: [Npc?]? {
73 | get {
74 | return (resultMap["npc"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [Npc?] in value.map { (value: ResultMap?) -> Npc? in value.flatMap { (value: ResultMap) -> Npc in Npc(unsafeResultMap: value) } } }
75 | }
76 | set {
77 | resultMap.updateValue(newValue.flatMap { (value: [Npc?]) -> [ResultMap?] in value.map { (value: Npc?) -> ResultMap? in value.flatMap { (value: Npc) -> ResultMap in value.resultMap } } }, forKey: "npc")
78 | }
79 | }
80 |
81 | public var boss: [Boss?]? {
82 | get {
83 | return (resultMap["boss"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [Boss?] in value.map { (value: ResultMap?) -> Boss? in value.flatMap { (value: ResultMap) -> Boss in Boss(unsafeResultMap: value) } } }
84 | }
85 | set {
86 | resultMap.updateValue(newValue.flatMap { (value: [Boss?]) -> [ResultMap?] in value.map { (value: Boss?) -> ResultMap? in value.flatMap { (value: Boss) -> ResultMap in value.resultMap } } }, forKey: "boss")
87 | }
88 | }
89 |
90 | public var creature: [Creature?]? {
91 | get {
92 | return (resultMap["creature"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [Creature?] in value.map { (value: ResultMap?) -> Creature? in value.flatMap { (value: ResultMap) -> Creature in Creature(unsafeResultMap: value) } } }
93 | }
94 | set {
95 | resultMap.updateValue(newValue.flatMap { (value: [Creature?]) -> [ResultMap?] in value.map { (value: Creature?) -> ResultMap? in value.flatMap { (value: Creature) -> ResultMap in value.resultMap } } }, forKey: "creature")
96 | }
97 | }
98 |
99 | public struct Npc: GraphQLSelectionSet {
100 | public static let possibleTypes: [String] = ["Npc"]
101 |
102 | public static var selections: [GraphQLSelection] {
103 | return [
104 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
105 | GraphQLFragmentSpread(NpcData.self),
106 | ]
107 | }
108 |
109 | public private(set) var resultMap: ResultMap
110 |
111 | public init(unsafeResultMap: ResultMap) {
112 | self.resultMap = unsafeResultMap
113 | }
114 |
115 | public init(id: GraphQLID, name: String? = nil, location: String? = nil, role: String? = nil, image: String? = nil, quote: String? = nil, description: String? = nil) {
116 | self.init(unsafeResultMap: ["__typename": "Npc", "id": id, "name": name, "location": location, "role": role, "image": image, "quote": quote, "description": description])
117 | }
118 |
119 | public var __typename: String {
120 | get {
121 | return resultMap["__typename"]! as! String
122 | }
123 | set {
124 | resultMap.updateValue(newValue, forKey: "__typename")
125 | }
126 | }
127 |
128 | public var fragments: Fragments {
129 | get {
130 | return Fragments(unsafeResultMap: resultMap)
131 | }
132 | set {
133 | resultMap += newValue.resultMap
134 | }
135 | }
136 |
137 | public struct Fragments {
138 | public private(set) var resultMap: ResultMap
139 |
140 | public init(unsafeResultMap: ResultMap) {
141 | self.resultMap = unsafeResultMap
142 | }
143 |
144 | public var npcData: NpcData {
145 | get {
146 | return NpcData(unsafeResultMap: resultMap)
147 | }
148 | set {
149 | resultMap += newValue.resultMap
150 | }
151 | }
152 | }
153 | }
154 |
155 | public struct Boss: GraphQLSelectionSet {
156 | public static let possibleTypes: [String] = ["Boss"]
157 |
158 | public static var selections: [GraphQLSelection] {
159 | return [
160 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
161 | GraphQLFragmentSpread(BossData.self),
162 | ]
163 | }
164 |
165 | public private(set) var resultMap: ResultMap
166 |
167 | public init(unsafeResultMap: ResultMap) {
168 | self.resultMap = unsafeResultMap
169 | }
170 |
171 | public init(id: GraphQLID, name: String? = nil, location: String? = nil, description: String? = nil, healthPoints: String? = nil, drops: [String?]? = nil, image: String? = nil) {
172 | self.init(unsafeResultMap: ["__typename": "Boss", "id": id, "name": name, "location": location, "description": description, "healthPoints": healthPoints, "drops": drops, "image": image])
173 | }
174 |
175 | public var __typename: String {
176 | get {
177 | return resultMap["__typename"]! as! String
178 | }
179 | set {
180 | resultMap.updateValue(newValue, forKey: "__typename")
181 | }
182 | }
183 |
184 | public var fragments: Fragments {
185 | get {
186 | return Fragments(unsafeResultMap: resultMap)
187 | }
188 | set {
189 | resultMap += newValue.resultMap
190 | }
191 | }
192 |
193 | public struct Fragments {
194 | public private(set) var resultMap: ResultMap
195 |
196 | public init(unsafeResultMap: ResultMap) {
197 | self.resultMap = unsafeResultMap
198 | }
199 |
200 | public var bossData: BossData {
201 | get {
202 | return BossData(unsafeResultMap: resultMap)
203 | }
204 | set {
205 | resultMap += newValue.resultMap
206 | }
207 | }
208 | }
209 | }
210 |
211 | public struct Creature: GraphQLSelectionSet {
212 | public static let possibleTypes: [String] = ["Creature"]
213 |
214 | public static var selections: [GraphQLSelection] {
215 | return [
216 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
217 | GraphQLFragmentSpread(CreatureData.self),
218 | ]
219 | }
220 |
221 | public private(set) var resultMap: ResultMap
222 |
223 | public init(unsafeResultMap: ResultMap) {
224 | self.resultMap = unsafeResultMap
225 | }
226 |
227 | public init(id: GraphQLID, name: String? = nil, location: String? = nil, image: String? = nil, drops: [String?]? = nil, description: String? = nil) {
228 | self.init(unsafeResultMap: ["__typename": "Creature", "id": id, "name": name, "location": location, "image": image, "drops": drops, "description": description])
229 | }
230 |
231 | public var __typename: String {
232 | get {
233 | return resultMap["__typename"]! as! String
234 | }
235 | set {
236 | resultMap.updateValue(newValue, forKey: "__typename")
237 | }
238 | }
239 |
240 | public var fragments: Fragments {
241 | get {
242 | return Fragments(unsafeResultMap: resultMap)
243 | }
244 | set {
245 | resultMap += newValue.resultMap
246 | }
247 | }
248 |
249 | public struct Fragments {
250 | public private(set) var resultMap: ResultMap
251 |
252 | public init(unsafeResultMap: ResultMap) {
253 | self.resultMap = unsafeResultMap
254 | }
255 |
256 | public var creatureData: CreatureData {
257 | get {
258 | return CreatureData(unsafeResultMap: resultMap)
259 | }
260 | set {
261 | resultMap += newValue.resultMap
262 | }
263 | }
264 | }
265 | }
266 | }
267 | }
268 |
269 | struct NpcData: GraphQLFragment {
270 | /// The raw GraphQL definition of this fragment.
271 | public static let fragmentDefinition: String =
272 | """
273 | fragment NPCData on Npc {
274 | __typename
275 | id
276 | name
277 | location
278 | role
279 | image
280 | quote
281 | description
282 | }
283 | """
284 |
285 | public static let possibleTypes: [String] = ["Npc"]
286 |
287 | public static var selections: [GraphQLSelection] {
288 | return [
289 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
290 | GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))),
291 | GraphQLField("name", type: .scalar(String.self)),
292 | GraphQLField("location", type: .scalar(String.self)),
293 | GraphQLField("role", type: .scalar(String.self)),
294 | GraphQLField("image", type: .scalar(String.self)),
295 | GraphQLField("quote", type: .scalar(String.self)),
296 | GraphQLField("description", type: .scalar(String.self)),
297 | ]
298 | }
299 |
300 | public private(set) var resultMap: ResultMap
301 |
302 | public init(unsafeResultMap: ResultMap) {
303 | self.resultMap = unsafeResultMap
304 | }
305 |
306 | public init(id: GraphQLID, name: String? = nil, location: String? = nil, role: String? = nil, image: String? = nil, quote: String? = nil, description: String? = nil) {
307 | self.init(unsafeResultMap: ["__typename": "Npc", "id": id, "name": name, "location": location, "role": role, "image": image, "quote": quote, "description": description])
308 | }
309 |
310 | public var __typename: String {
311 | get {
312 | return resultMap["__typename"]! as! String
313 | }
314 | set {
315 | resultMap.updateValue(newValue, forKey: "__typename")
316 | }
317 | }
318 |
319 | public var id: GraphQLID {
320 | get {
321 | return resultMap["id"]! as! GraphQLID
322 | }
323 | set {
324 | resultMap.updateValue(newValue, forKey: "id")
325 | }
326 | }
327 |
328 | public var name: String? {
329 | get {
330 | return resultMap["name"] as? String
331 | }
332 | set {
333 | resultMap.updateValue(newValue, forKey: "name")
334 | }
335 | }
336 |
337 | public var location: String? {
338 | get {
339 | return resultMap["location"] as? String
340 | }
341 | set {
342 | resultMap.updateValue(newValue, forKey: "location")
343 | }
344 | }
345 |
346 | public var role: String? {
347 | get {
348 | return resultMap["role"] as? String
349 | }
350 | set {
351 | resultMap.updateValue(newValue, forKey: "role")
352 | }
353 | }
354 |
355 | public var image: String? {
356 | get {
357 | return resultMap["image"] as? String
358 | }
359 | set {
360 | resultMap.updateValue(newValue, forKey: "image")
361 | }
362 | }
363 |
364 | public var quote: String? {
365 | get {
366 | return resultMap["quote"] as? String
367 | }
368 | set {
369 | resultMap.updateValue(newValue, forKey: "quote")
370 | }
371 | }
372 |
373 | public var description: String? {
374 | get {
375 | return resultMap["description"] as? String
376 | }
377 | set {
378 | resultMap.updateValue(newValue, forKey: "description")
379 | }
380 | }
381 | }
382 |
383 | struct BossData: GraphQLFragment {
384 | /// The raw GraphQL definition of this fragment.
385 | public static let fragmentDefinition: String =
386 | """
387 | fragment BossData on Boss {
388 | __typename
389 | id
390 | name
391 | location
392 | description
393 | healthPoints
394 | drops
395 | image
396 | }
397 | """
398 |
399 | public static let possibleTypes: [String] = ["Boss"]
400 |
401 | public static var selections: [GraphQLSelection] {
402 | return [
403 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
404 | GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))),
405 | GraphQLField("name", type: .scalar(String.self)),
406 | GraphQLField("location", type: .scalar(String.self)),
407 | GraphQLField("description", type: .scalar(String.self)),
408 | GraphQLField("healthPoints", type: .scalar(String.self)),
409 | GraphQLField("drops", type: .list(.scalar(String.self))),
410 | GraphQLField("image", type: .scalar(String.self)),
411 | ]
412 | }
413 |
414 | public private(set) var resultMap: ResultMap
415 |
416 | public init(unsafeResultMap: ResultMap) {
417 | self.resultMap = unsafeResultMap
418 | }
419 |
420 | public init(id: GraphQLID, name: String? = nil, location: String? = nil, description: String? = nil, healthPoints: String? = nil, drops: [String?]? = nil, image: String? = nil) {
421 | self.init(unsafeResultMap: ["__typename": "Boss", "id": id, "name": name, "location": location, "description": description, "healthPoints": healthPoints, "drops": drops, "image": image])
422 | }
423 |
424 | public var __typename: String {
425 | get {
426 | return resultMap["__typename"]! as! String
427 | }
428 | set {
429 | resultMap.updateValue(newValue, forKey: "__typename")
430 | }
431 | }
432 |
433 | public var id: GraphQLID {
434 | get {
435 | return resultMap["id"]! as! GraphQLID
436 | }
437 | set {
438 | resultMap.updateValue(newValue, forKey: "id")
439 | }
440 | }
441 |
442 | public var name: String? {
443 | get {
444 | return resultMap["name"] as? String
445 | }
446 | set {
447 | resultMap.updateValue(newValue, forKey: "name")
448 | }
449 | }
450 |
451 | public var location: String? {
452 | get {
453 | return resultMap["location"] as? String
454 | }
455 | set {
456 | resultMap.updateValue(newValue, forKey: "location")
457 | }
458 | }
459 |
460 | public var description: String? {
461 | get {
462 | return resultMap["description"] as? String
463 | }
464 | set {
465 | resultMap.updateValue(newValue, forKey: "description")
466 | }
467 | }
468 |
469 | public var healthPoints: String? {
470 | get {
471 | return resultMap["healthPoints"] as? String
472 | }
473 | set {
474 | resultMap.updateValue(newValue, forKey: "healthPoints")
475 | }
476 | }
477 |
478 | public var drops: [String?]? {
479 | get {
480 | return resultMap["drops"] as? [String?]
481 | }
482 | set {
483 | resultMap.updateValue(newValue, forKey: "drops")
484 | }
485 | }
486 |
487 | public var image: String? {
488 | get {
489 | return resultMap["image"] as? String
490 | }
491 | set {
492 | resultMap.updateValue(newValue, forKey: "image")
493 | }
494 | }
495 | }
496 |
497 | struct CreatureData: GraphQLFragment {
498 | /// The raw GraphQL definition of this fragment.
499 | public static let fragmentDefinition: String =
500 | """
501 | fragment CreatureData on Creature {
502 | __typename
503 | id
504 | name
505 | location
506 | image
507 | drops
508 | description
509 | }
510 | """
511 |
512 | public static let possibleTypes: [String] = ["Creature"]
513 |
514 | public static var selections: [GraphQLSelection] {
515 | return [
516 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
517 | GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))),
518 | GraphQLField("name", type: .scalar(String.self)),
519 | GraphQLField("location", type: .scalar(String.self)),
520 | GraphQLField("image", type: .scalar(String.self)),
521 | GraphQLField("drops", type: .list(.scalar(String.self))),
522 | GraphQLField("description", type: .scalar(String.self)),
523 | ]
524 | }
525 |
526 | public private(set) var resultMap: ResultMap
527 |
528 | public init(unsafeResultMap: ResultMap) {
529 | self.resultMap = unsafeResultMap
530 | }
531 |
532 | public init(id: GraphQLID, name: String? = nil, location: String? = nil, image: String? = nil, drops: [String?]? = nil, description: String? = nil) {
533 | self.init(unsafeResultMap: ["__typename": "Creature", "id": id, "name": name, "location": location, "image": image, "drops": drops, "description": description])
534 | }
535 |
536 | public var __typename: String {
537 | get {
538 | return resultMap["__typename"]! as! String
539 | }
540 | set {
541 | resultMap.updateValue(newValue, forKey: "__typename")
542 | }
543 | }
544 |
545 | public var id: GraphQLID {
546 | get {
547 | return resultMap["id"]! as! GraphQLID
548 | }
549 | set {
550 | resultMap.updateValue(newValue, forKey: "id")
551 | }
552 | }
553 |
554 | public var name: String? {
555 | get {
556 | return resultMap["name"] as? String
557 | }
558 | set {
559 | resultMap.updateValue(newValue, forKey: "name")
560 | }
561 | }
562 |
563 | public var location: String? {
564 | get {
565 | return resultMap["location"] as? String
566 | }
567 | set {
568 | resultMap.updateValue(newValue, forKey: "location")
569 | }
570 | }
571 |
572 | public var image: String? {
573 | get {
574 | return resultMap["image"] as? String
575 | }
576 | set {
577 | resultMap.updateValue(newValue, forKey: "image")
578 | }
579 | }
580 |
581 | public var drops: [String?]? {
582 | get {
583 | return resultMap["drops"] as? [String?]
584 | }
585 | set {
586 | resultMap.updateValue(newValue, forKey: "drops")
587 | }
588 | }
589 |
590 | public var description: String? {
591 | get {
592 | return resultMap["description"] as? String
593 | }
594 | set {
595 | resultMap.updateValue(newValue, forKey: "description")
596 | }
597 | }
598 | }
599 | }
600 |
--------------------------------------------------------------------------------
/Modules/Models/Sources/ApolloModels/magic.graphql.swift:
--------------------------------------------------------------------------------
1 | // @generated
2 | // This file was automatically generated and should not be edited.
3 |
4 | import Apollo
5 | import Foundation
6 |
7 | /// GQL namespace
8 | public extension GQL {
9 | final class GetMagicQuery: GraphQLQuery {
10 | /// The raw GraphQL definition of this operation.
11 | public let operationDefinition: String =
12 | """
13 | query GetMagic($page: Int!, $limit: Int!) {
14 | sorcery(page: $page, limit: $limit) {
15 | __typename
16 | ...SorceryData
17 | }
18 | incantation(page: $page, limit: $limit) {
19 | __typename
20 | ...IncantationData
21 | }
22 | ashOfWar(page: $page, limit: $limit) {
23 | __typename
24 | ...AshOfWarData
25 | }
26 | spirit(page: $page, limit: $limit) {
27 | __typename
28 | ...SpiritData
29 | }
30 | }
31 | """
32 |
33 | public let operationName: String = "GetMagic"
34 |
35 | public var queryDocument: String {
36 | var document: String = operationDefinition
37 | document.append("\n" + SorceryData.fragmentDefinition)
38 | document.append("\n" + AttributeEntryData.fragmentDefinition)
39 | document.append("\n" + IncantationData.fragmentDefinition)
40 | document.append("\n" + AshOfWarData.fragmentDefinition)
41 | document.append("\n" + SpiritData.fragmentDefinition)
42 | return document
43 | }
44 |
45 | public var page: Int
46 | public var limit: Int
47 |
48 | public init(page: Int, limit: Int) {
49 | self.page = page
50 | self.limit = limit
51 | }
52 |
53 | public var variables: GraphQLMap? {
54 | return ["page": page, "limit": limit]
55 | }
56 |
57 | public struct Data: GraphQLSelectionSet {
58 | public static let possibleTypes: [String] = ["Query"]
59 |
60 | public static var selections: [GraphQLSelection] {
61 | return [
62 | GraphQLField("sorcery", arguments: ["page": GraphQLVariable("page"), "limit": GraphQLVariable("limit")], type: .list(.object(Sorcery.selections))),
63 | GraphQLField("incantation", arguments: ["page": GraphQLVariable("page"), "limit": GraphQLVariable("limit")], type: .list(.object(Incantation.selections))),
64 | GraphQLField("ashOfWar", arguments: ["page": GraphQLVariable("page"), "limit": GraphQLVariable("limit")], type: .list(.object(AshOfWar.selections))),
65 | GraphQLField("spirit", arguments: ["page": GraphQLVariable("page"), "limit": GraphQLVariable("limit")], type: .list(.object(Spirit.selections))),
66 | ]
67 | }
68 |
69 | public private(set) var resultMap: ResultMap
70 |
71 | public init(unsafeResultMap: ResultMap) {
72 | self.resultMap = unsafeResultMap
73 | }
74 |
75 | public init(sorcery: [Sorcery?]? = nil, incantation: [Incantation?]? = nil, ashOfWar: [AshOfWar?]? = nil, spirit: [Spirit?]? = nil) {
76 | self.init(unsafeResultMap: ["__typename": "Query", "sorcery": sorcery.flatMap { (value: [Sorcery?]) -> [ResultMap?] in value.map { (value: Sorcery?) -> ResultMap? in value.flatMap { (value: Sorcery) -> ResultMap in value.resultMap } } }, "incantation": incantation.flatMap { (value: [Incantation?]) -> [ResultMap?] in value.map { (value: Incantation?) -> ResultMap? in value.flatMap { (value: Incantation) -> ResultMap in value.resultMap } } }, "ashOfWar": ashOfWar.flatMap { (value: [AshOfWar?]) -> [ResultMap?] in value.map { (value: AshOfWar?) -> ResultMap? in value.flatMap { (value: AshOfWar) -> ResultMap in value.resultMap } } }, "spirit": spirit.flatMap { (value: [Spirit?]) -> [ResultMap?] in value.map { (value: Spirit?) -> ResultMap? in value.flatMap { (value: Spirit) -> ResultMap in value.resultMap } } }])
77 | }
78 |
79 | public var sorcery: [Sorcery?]? {
80 | get {
81 | return (resultMap["sorcery"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [Sorcery?] in value.map { (value: ResultMap?) -> Sorcery? in value.flatMap { (value: ResultMap) -> Sorcery in Sorcery(unsafeResultMap: value) } } }
82 | }
83 | set {
84 | resultMap.updateValue(newValue.flatMap { (value: [Sorcery?]) -> [ResultMap?] in value.map { (value: Sorcery?) -> ResultMap? in value.flatMap { (value: Sorcery) -> ResultMap in value.resultMap } } }, forKey: "sorcery")
85 | }
86 | }
87 |
88 | public var incantation: [Incantation?]? {
89 | get {
90 | return (resultMap["incantation"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [Incantation?] in value.map { (value: ResultMap?) -> Incantation? in value.flatMap { (value: ResultMap) -> Incantation in Incantation(unsafeResultMap: value) } } }
91 | }
92 | set {
93 | resultMap.updateValue(newValue.flatMap { (value: [Incantation?]) -> [ResultMap?] in value.map { (value: Incantation?) -> ResultMap? in value.flatMap { (value: Incantation) -> ResultMap in value.resultMap } } }, forKey: "incantation")
94 | }
95 | }
96 |
97 | public var ashOfWar: [AshOfWar?]? {
98 | get {
99 | return (resultMap["ashOfWar"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [AshOfWar?] in value.map { (value: ResultMap?) -> AshOfWar? in value.flatMap { (value: ResultMap) -> AshOfWar in AshOfWar(unsafeResultMap: value) } } }
100 | }
101 | set {
102 | resultMap.updateValue(newValue.flatMap { (value: [AshOfWar?]) -> [ResultMap?] in value.map { (value: AshOfWar?) -> ResultMap? in value.flatMap { (value: AshOfWar) -> ResultMap in value.resultMap } } }, forKey: "ashOfWar")
103 | }
104 | }
105 |
106 | public var spirit: [Spirit?]? {
107 | get {
108 | return (resultMap["spirit"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [Spirit?] in value.map { (value: ResultMap?) -> Spirit? in value.flatMap { (value: ResultMap) -> Spirit in Spirit(unsafeResultMap: value) } } }
109 | }
110 | set {
111 | resultMap.updateValue(newValue.flatMap { (value: [Spirit?]) -> [ResultMap?] in value.map { (value: Spirit?) -> ResultMap? in value.flatMap { (value: Spirit) -> ResultMap in value.resultMap } } }, forKey: "spirit")
112 | }
113 | }
114 |
115 | public struct Sorcery: GraphQLSelectionSet {
116 | public static let possibleTypes: [String] = ["Sorcery"]
117 |
118 | public static var selections: [GraphQLSelection] {
119 | return [
120 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
121 | GraphQLFragmentSpread(SorceryData.self),
122 | ]
123 | }
124 |
125 | public private(set) var resultMap: ResultMap
126 |
127 | public init(unsafeResultMap: ResultMap) {
128 | self.resultMap = unsafeResultMap
129 | }
130 |
131 | public var __typename: String {
132 | get {
133 | return resultMap["__typename"]! as! String
134 | }
135 | set {
136 | resultMap.updateValue(newValue, forKey: "__typename")
137 | }
138 | }
139 |
140 | public var fragments: Fragments {
141 | get {
142 | return Fragments(unsafeResultMap: resultMap)
143 | }
144 | set {
145 | resultMap += newValue.resultMap
146 | }
147 | }
148 |
149 | public struct Fragments {
150 | public private(set) var resultMap: ResultMap
151 |
152 | public init(unsafeResultMap: ResultMap) {
153 | self.resultMap = unsafeResultMap
154 | }
155 |
156 | public var sorceryData: SorceryData {
157 | get {
158 | return SorceryData(unsafeResultMap: resultMap)
159 | }
160 | set {
161 | resultMap += newValue.resultMap
162 | }
163 | }
164 | }
165 | }
166 |
167 | public struct Incantation: GraphQLSelectionSet {
168 | public static let possibleTypes: [String] = ["Incantation"]
169 |
170 | public static var selections: [GraphQLSelection] {
171 | return [
172 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
173 | GraphQLFragmentSpread(IncantationData.self),
174 | ]
175 | }
176 |
177 | public private(set) var resultMap: ResultMap
178 |
179 | public init(unsafeResultMap: ResultMap) {
180 | self.resultMap = unsafeResultMap
181 | }
182 |
183 | public var __typename: String {
184 | get {
185 | return resultMap["__typename"]! as! String
186 | }
187 | set {
188 | resultMap.updateValue(newValue, forKey: "__typename")
189 | }
190 | }
191 |
192 | public var fragments: Fragments {
193 | get {
194 | return Fragments(unsafeResultMap: resultMap)
195 | }
196 | set {
197 | resultMap += newValue.resultMap
198 | }
199 | }
200 |
201 | public struct Fragments {
202 | public private(set) var resultMap: ResultMap
203 |
204 | public init(unsafeResultMap: ResultMap) {
205 | self.resultMap = unsafeResultMap
206 | }
207 |
208 | public var incantationData: IncantationData {
209 | get {
210 | return IncantationData(unsafeResultMap: resultMap)
211 | }
212 | set {
213 | resultMap += newValue.resultMap
214 | }
215 | }
216 | }
217 | }
218 |
219 | public struct AshOfWar: GraphQLSelectionSet {
220 | public static let possibleTypes: [String] = ["AshOfWar"]
221 |
222 | public static var selections: [GraphQLSelection] {
223 | return [
224 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
225 | GraphQLFragmentSpread(AshOfWarData.self),
226 | ]
227 | }
228 |
229 | public private(set) var resultMap: ResultMap
230 |
231 | public init(unsafeResultMap: ResultMap) {
232 | self.resultMap = unsafeResultMap
233 | }
234 |
235 | public init(id: GraphQLID, name: String? = nil, image: String? = nil, description: String? = nil, affinity: String? = nil, skill: String? = nil) {
236 | self.init(unsafeResultMap: ["__typename": "AshOfWar", "id": id, "name": name, "image": image, "description": description, "affinity": affinity, "skill": skill])
237 | }
238 |
239 | public var __typename: String {
240 | get {
241 | return resultMap["__typename"]! as! String
242 | }
243 | set {
244 | resultMap.updateValue(newValue, forKey: "__typename")
245 | }
246 | }
247 |
248 | public var fragments: Fragments {
249 | get {
250 | return Fragments(unsafeResultMap: resultMap)
251 | }
252 | set {
253 | resultMap += newValue.resultMap
254 | }
255 | }
256 |
257 | public struct Fragments {
258 | public private(set) var resultMap: ResultMap
259 |
260 | public init(unsafeResultMap: ResultMap) {
261 | self.resultMap = unsafeResultMap
262 | }
263 |
264 | public var ashOfWarData: AshOfWarData {
265 | get {
266 | return AshOfWarData(unsafeResultMap: resultMap)
267 | }
268 | set {
269 | resultMap += newValue.resultMap
270 | }
271 | }
272 | }
273 | }
274 |
275 | public struct Spirit: GraphQLSelectionSet {
276 | public static let possibleTypes: [String] = ["Spirit"]
277 |
278 | public static var selections: [GraphQLSelection] {
279 | return [
280 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
281 | GraphQLFragmentSpread(SpiritData.self),
282 | ]
283 | }
284 |
285 | public private(set) var resultMap: ResultMap
286 |
287 | public init(unsafeResultMap: ResultMap) {
288 | self.resultMap = unsafeResultMap
289 | }
290 |
291 | public init(id: GraphQLID, name: String? = nil, image: String? = nil, description: String? = nil, fpCost: String? = nil, hpCost: String? = nil, effect: String? = nil) {
292 | self.init(unsafeResultMap: ["__typename": "Spirit", "id": id, "name": name, "image": image, "description": description, "fpCost": fpCost, "hpCost": hpCost, "effect": effect])
293 | }
294 |
295 | public var __typename: String {
296 | get {
297 | return resultMap["__typename"]! as! String
298 | }
299 | set {
300 | resultMap.updateValue(newValue, forKey: "__typename")
301 | }
302 | }
303 |
304 | public var fragments: Fragments {
305 | get {
306 | return Fragments(unsafeResultMap: resultMap)
307 | }
308 | set {
309 | resultMap += newValue.resultMap
310 | }
311 | }
312 |
313 | public struct Fragments {
314 | public private(set) var resultMap: ResultMap
315 |
316 | public init(unsafeResultMap: ResultMap) {
317 | self.resultMap = unsafeResultMap
318 | }
319 |
320 | public var spiritData: SpiritData {
321 | get {
322 | return SpiritData(unsafeResultMap: resultMap)
323 | }
324 | set {
325 | resultMap += newValue.resultMap
326 | }
327 | }
328 | }
329 | }
330 | }
331 | }
332 |
333 | struct IncantationData: GraphQLFragment {
334 | /// The raw GraphQL definition of this fragment.
335 | public static let fragmentDefinition: String =
336 | """
337 | fragment IncantationData on Incantation {
338 | __typename
339 | id
340 | name
341 | description
342 | effects
343 | image
344 | slots
345 | cost
346 | requires {
347 | __typename
348 | ...AttributeEntryData
349 | }
350 | }
351 | """
352 |
353 | public static let possibleTypes: [String] = ["Incantation"]
354 |
355 | public static var selections: [GraphQLSelection] {
356 | return [
357 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
358 | GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))),
359 | GraphQLField("name", type: .scalar(String.self)),
360 | GraphQLField("description", type: .scalar(String.self)),
361 | GraphQLField("effects", type: .scalar(String.self)),
362 | GraphQLField("image", type: .scalar(String.self)),
363 | GraphQLField("slots", type: .scalar(Int.self)),
364 | GraphQLField("cost", type: .scalar(Int.self)),
365 | GraphQLField("requires", type: .list(.object(Require.selections))),
366 | ]
367 | }
368 |
369 | public private(set) var resultMap: ResultMap
370 |
371 | public init(unsafeResultMap: ResultMap) {
372 | self.resultMap = unsafeResultMap
373 | }
374 |
375 | public init(id: GraphQLID, name: String? = nil, description: String? = nil, effects: String? = nil, image: String? = nil, slots: Int? = nil, cost: Int? = nil, requires: [Require?]? = nil) {
376 | self.init(unsafeResultMap: ["__typename": "Incantation", "id": id, "name": name, "description": description, "effects": effects, "image": image, "slots": slots, "cost": cost, "requires": requires.flatMap { (value: [Require?]) -> [ResultMap?] in value.map { (value: Require?) -> ResultMap? in value.flatMap { (value: Require) -> ResultMap in value.resultMap } } }])
377 | }
378 |
379 | public var __typename: String {
380 | get {
381 | return resultMap["__typename"]! as! String
382 | }
383 | set {
384 | resultMap.updateValue(newValue, forKey: "__typename")
385 | }
386 | }
387 |
388 | public var id: GraphQLID {
389 | get {
390 | return resultMap["id"]! as! GraphQLID
391 | }
392 | set {
393 | resultMap.updateValue(newValue, forKey: "id")
394 | }
395 | }
396 |
397 | public var name: String? {
398 | get {
399 | return resultMap["name"] as? String
400 | }
401 | set {
402 | resultMap.updateValue(newValue, forKey: "name")
403 | }
404 | }
405 |
406 | public var description: String? {
407 | get {
408 | return resultMap["description"] as? String
409 | }
410 | set {
411 | resultMap.updateValue(newValue, forKey: "description")
412 | }
413 | }
414 |
415 | public var effects: String? {
416 | get {
417 | return resultMap["effects"] as? String
418 | }
419 | set {
420 | resultMap.updateValue(newValue, forKey: "effects")
421 | }
422 | }
423 |
424 | public var image: String? {
425 | get {
426 | return resultMap["image"] as? String
427 | }
428 | set {
429 | resultMap.updateValue(newValue, forKey: "image")
430 | }
431 | }
432 |
433 | public var slots: Int? {
434 | get {
435 | return resultMap["slots"] as? Int
436 | }
437 | set {
438 | resultMap.updateValue(newValue, forKey: "slots")
439 | }
440 | }
441 |
442 | public var cost: Int? {
443 | get {
444 | return resultMap["cost"] as? Int
445 | }
446 | set {
447 | resultMap.updateValue(newValue, forKey: "cost")
448 | }
449 | }
450 |
451 | public var requires: [Require?]? {
452 | get {
453 | return (resultMap["requires"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [Require?] in value.map { (value: ResultMap?) -> Require? in value.flatMap { (value: ResultMap) -> Require in Require(unsafeResultMap: value) } } }
454 | }
455 | set {
456 | resultMap.updateValue(newValue.flatMap { (value: [Require?]) -> [ResultMap?] in value.map { (value: Require?) -> ResultMap? in value.flatMap { (value: Require) -> ResultMap in value.resultMap } } }, forKey: "requires")
457 | }
458 | }
459 |
460 | public struct Require: GraphQLSelectionSet {
461 | public static let possibleTypes: [String] = ["AttributeEntry"]
462 |
463 | public static var selections: [GraphQLSelection] {
464 | return [
465 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
466 | GraphQLFragmentSpread(AttributeEntryData.self),
467 | ]
468 | }
469 |
470 | public private(set) var resultMap: ResultMap
471 |
472 | public init(unsafeResultMap: ResultMap) {
473 | self.resultMap = unsafeResultMap
474 | }
475 |
476 | public init(name: String? = nil, amount: Int? = nil) {
477 | self.init(unsafeResultMap: ["__typename": "AttributeEntry", "name": name, "amount": amount])
478 | }
479 |
480 | public var __typename: String {
481 | get {
482 | return resultMap["__typename"]! as! String
483 | }
484 | set {
485 | resultMap.updateValue(newValue, forKey: "__typename")
486 | }
487 | }
488 |
489 | public var fragments: Fragments {
490 | get {
491 | return Fragments(unsafeResultMap: resultMap)
492 | }
493 | set {
494 | resultMap += newValue.resultMap
495 | }
496 | }
497 |
498 | public struct Fragments {
499 | public private(set) var resultMap: ResultMap
500 |
501 | public init(unsafeResultMap: ResultMap) {
502 | self.resultMap = unsafeResultMap
503 | }
504 |
505 | public var attributeEntryData: AttributeEntryData {
506 | get {
507 | return AttributeEntryData(unsafeResultMap: resultMap)
508 | }
509 | set {
510 | resultMap += newValue.resultMap
511 | }
512 | }
513 | }
514 | }
515 | }
516 |
517 | struct SorceryData: GraphQLFragment {
518 | /// The raw GraphQL definition of this fragment.
519 | public static let fragmentDefinition: String =
520 | """
521 | fragment SorceryData on Sorcery {
522 | __typename
523 | id
524 | name
525 | description
526 | effects
527 | image
528 | slots
529 | cost
530 | requires {
531 | __typename
532 | ...AttributeEntryData
533 | }
534 | }
535 | """
536 |
537 | public static let possibleTypes: [String] = ["Sorcery"]
538 |
539 | public static var selections: [GraphQLSelection] {
540 | return [
541 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
542 | GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))),
543 | GraphQLField("name", type: .scalar(String.self)),
544 | GraphQLField("description", type: .scalar(String.self)),
545 | GraphQLField("effects", type: .scalar(String.self)),
546 | GraphQLField("image", type: .scalar(String.self)),
547 | GraphQLField("slots", type: .scalar(Int.self)),
548 | GraphQLField("cost", type: .scalar(Int.self)),
549 | GraphQLField("requires", type: .list(.object(Require.selections))),
550 | ]
551 | }
552 |
553 | public private(set) var resultMap: ResultMap
554 |
555 | public init(unsafeResultMap: ResultMap) {
556 | self.resultMap = unsafeResultMap
557 | }
558 |
559 | public init(id: GraphQLID, name: String? = nil, description: String? = nil, effects: String? = nil, image: String? = nil, slots: Int? = nil, cost: Int? = nil, requires: [Require?]? = nil) {
560 | self.init(unsafeResultMap: ["__typename": "Sorcery", "id": id, "name": name, "description": description, "effects": effects, "image": image, "slots": slots, "cost": cost, "requires": requires.flatMap { (value: [Require?]) -> [ResultMap?] in value.map { (value: Require?) -> ResultMap? in value.flatMap { (value: Require) -> ResultMap in value.resultMap } } }])
561 | }
562 |
563 | public var __typename: String {
564 | get {
565 | return resultMap["__typename"]! as! String
566 | }
567 | set {
568 | resultMap.updateValue(newValue, forKey: "__typename")
569 | }
570 | }
571 |
572 | public var id: GraphQLID {
573 | get {
574 | return resultMap["id"]! as! GraphQLID
575 | }
576 | set {
577 | resultMap.updateValue(newValue, forKey: "id")
578 | }
579 | }
580 |
581 | public var name: String? {
582 | get {
583 | return resultMap["name"] as? String
584 | }
585 | set {
586 | resultMap.updateValue(newValue, forKey: "name")
587 | }
588 | }
589 |
590 | public var description: String? {
591 | get {
592 | return resultMap["description"] as? String
593 | }
594 | set {
595 | resultMap.updateValue(newValue, forKey: "description")
596 | }
597 | }
598 |
599 | public var effects: String? {
600 | get {
601 | return resultMap["effects"] as? String
602 | }
603 | set {
604 | resultMap.updateValue(newValue, forKey: "effects")
605 | }
606 | }
607 |
608 | public var image: String? {
609 | get {
610 | return resultMap["image"] as? String
611 | }
612 | set {
613 | resultMap.updateValue(newValue, forKey: "image")
614 | }
615 | }
616 |
617 | public var slots: Int? {
618 | get {
619 | return resultMap["slots"] as? Int
620 | }
621 | set {
622 | resultMap.updateValue(newValue, forKey: "slots")
623 | }
624 | }
625 |
626 | public var cost: Int? {
627 | get {
628 | return resultMap["cost"] as? Int
629 | }
630 | set {
631 | resultMap.updateValue(newValue, forKey: "cost")
632 | }
633 | }
634 |
635 | public var requires: [Require?]? {
636 | get {
637 | return (resultMap["requires"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [Require?] in value.map { (value: ResultMap?) -> Require? in value.flatMap { (value: ResultMap) -> Require in Require(unsafeResultMap: value) } } }
638 | }
639 | set {
640 | resultMap.updateValue(newValue.flatMap { (value: [Require?]) -> [ResultMap?] in value.map { (value: Require?) -> ResultMap? in value.flatMap { (value: Require) -> ResultMap in value.resultMap } } }, forKey: "requires")
641 | }
642 | }
643 |
644 | public struct Require: GraphQLSelectionSet {
645 | public static let possibleTypes: [String] = ["AttributeEntry"]
646 |
647 | public static var selections: [GraphQLSelection] {
648 | return [
649 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
650 | GraphQLFragmentSpread(AttributeEntryData.self),
651 | ]
652 | }
653 |
654 | public private(set) var resultMap: ResultMap
655 |
656 | public init(unsafeResultMap: ResultMap) {
657 | self.resultMap = unsafeResultMap
658 | }
659 |
660 | public init(name: String? = nil, amount: Int? = nil) {
661 | self.init(unsafeResultMap: ["__typename": "AttributeEntry", "name": name, "amount": amount])
662 | }
663 |
664 | public var __typename: String {
665 | get {
666 | return resultMap["__typename"]! as! String
667 | }
668 | set {
669 | resultMap.updateValue(newValue, forKey: "__typename")
670 | }
671 | }
672 |
673 | public var fragments: Fragments {
674 | get {
675 | return Fragments(unsafeResultMap: resultMap)
676 | }
677 | set {
678 | resultMap += newValue.resultMap
679 | }
680 | }
681 |
682 | public struct Fragments {
683 | public private(set) var resultMap: ResultMap
684 |
685 | public init(unsafeResultMap: ResultMap) {
686 | self.resultMap = unsafeResultMap
687 | }
688 |
689 | public var attributeEntryData: AttributeEntryData {
690 | get {
691 | return AttributeEntryData(unsafeResultMap: resultMap)
692 | }
693 | set {
694 | resultMap += newValue.resultMap
695 | }
696 | }
697 | }
698 | }
699 | }
700 |
701 | struct AshOfWarData: GraphQLFragment {
702 | /// The raw GraphQL definition of this fragment.
703 | public static let fragmentDefinition: String =
704 | """
705 | fragment AshOfWarData on AshOfWar {
706 | __typename
707 | id
708 | name
709 | image
710 | description
711 | affinity
712 | skill
713 | }
714 | """
715 |
716 | public static let possibleTypes: [String] = ["AshOfWar"]
717 |
718 | public static var selections: [GraphQLSelection] {
719 | return [
720 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
721 | GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))),
722 | GraphQLField("name", type: .scalar(String.self)),
723 | GraphQLField("image", type: .scalar(String.self)),
724 | GraphQLField("description", type: .scalar(String.self)),
725 | GraphQLField("affinity", type: .scalar(String.self)),
726 | GraphQLField("skill", type: .scalar(String.self)),
727 | ]
728 | }
729 |
730 | public private(set) var resultMap: ResultMap
731 |
732 | public init(unsafeResultMap: ResultMap) {
733 | self.resultMap = unsafeResultMap
734 | }
735 |
736 | public init(id: GraphQLID, name: String? = nil, image: String? = nil, description: String? = nil, affinity: String? = nil, skill: String? = nil) {
737 | self.init(unsafeResultMap: ["__typename": "AshOfWar", "id": id, "name": name, "image": image, "description": description, "affinity": affinity, "skill": skill])
738 | }
739 |
740 | public var __typename: String {
741 | get {
742 | return resultMap["__typename"]! as! String
743 | }
744 | set {
745 | resultMap.updateValue(newValue, forKey: "__typename")
746 | }
747 | }
748 |
749 | public var id: GraphQLID {
750 | get {
751 | return resultMap["id"]! as! GraphQLID
752 | }
753 | set {
754 | resultMap.updateValue(newValue, forKey: "id")
755 | }
756 | }
757 |
758 | public var name: String? {
759 | get {
760 | return resultMap["name"] as? String
761 | }
762 | set {
763 | resultMap.updateValue(newValue, forKey: "name")
764 | }
765 | }
766 |
767 | public var image: String? {
768 | get {
769 | return resultMap["image"] as? String
770 | }
771 | set {
772 | resultMap.updateValue(newValue, forKey: "image")
773 | }
774 | }
775 |
776 | public var description: String? {
777 | get {
778 | return resultMap["description"] as? String
779 | }
780 | set {
781 | resultMap.updateValue(newValue, forKey: "description")
782 | }
783 | }
784 |
785 | public var affinity: String? {
786 | get {
787 | return resultMap["affinity"] as? String
788 | }
789 | set {
790 | resultMap.updateValue(newValue, forKey: "affinity")
791 | }
792 | }
793 |
794 | public var skill: String? {
795 | get {
796 | return resultMap["skill"] as? String
797 | }
798 | set {
799 | resultMap.updateValue(newValue, forKey: "skill")
800 | }
801 | }
802 | }
803 |
804 | struct SpiritData: GraphQLFragment {
805 | /// The raw GraphQL definition of this fragment.
806 | public static let fragmentDefinition: String =
807 | """
808 | fragment SpiritData on Spirit {
809 | __typename
810 | id
811 | name
812 | image
813 | description
814 | fpCost
815 | hpCost
816 | effect
817 | }
818 | """
819 |
820 | public static let possibleTypes: [String] = ["Spirit"]
821 |
822 | public static var selections: [GraphQLSelection] {
823 | return [
824 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
825 | GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))),
826 | GraphQLField("name", type: .scalar(String.self)),
827 | GraphQLField("image", type: .scalar(String.self)),
828 | GraphQLField("description", type: .scalar(String.self)),
829 | GraphQLField("fpCost", type: .scalar(String.self)),
830 | GraphQLField("hpCost", type: .scalar(String.self)),
831 | GraphQLField("effect", type: .scalar(String.self)),
832 | ]
833 | }
834 |
835 | public private(set) var resultMap: ResultMap
836 |
837 | public init(unsafeResultMap: ResultMap) {
838 | self.resultMap = unsafeResultMap
839 | }
840 |
841 | public init(id: GraphQLID, name: String? = nil, image: String? = nil, description: String? = nil, fpCost: String? = nil, hpCost: String? = nil, effect: String? = nil) {
842 | self.init(unsafeResultMap: ["__typename": "Spirit", "id": id, "name": name, "image": image, "description": description, "fpCost": fpCost, "hpCost": hpCost, "effect": effect])
843 | }
844 |
845 | public var __typename: String {
846 | get {
847 | return resultMap["__typename"]! as! String
848 | }
849 | set {
850 | resultMap.updateValue(newValue, forKey: "__typename")
851 | }
852 | }
853 |
854 | public var id: GraphQLID {
855 | get {
856 | return resultMap["id"]! as! GraphQLID
857 | }
858 | set {
859 | resultMap.updateValue(newValue, forKey: "id")
860 | }
861 | }
862 |
863 | public var name: String? {
864 | get {
865 | return resultMap["name"] as? String
866 | }
867 | set {
868 | resultMap.updateValue(newValue, forKey: "name")
869 | }
870 | }
871 |
872 | public var image: String? {
873 | get {
874 | return resultMap["image"] as? String
875 | }
876 | set {
877 | resultMap.updateValue(newValue, forKey: "image")
878 | }
879 | }
880 |
881 | public var description: String? {
882 | get {
883 | return resultMap["description"] as? String
884 | }
885 | set {
886 | resultMap.updateValue(newValue, forKey: "description")
887 | }
888 | }
889 |
890 | public var fpCost: String? {
891 | get {
892 | return resultMap["fpCost"] as? String
893 | }
894 | set {
895 | resultMap.updateValue(newValue, forKey: "fpCost")
896 | }
897 | }
898 |
899 | public var hpCost: String? {
900 | get {
901 | return resultMap["hpCost"] as? String
902 | }
903 | set {
904 | resultMap.updateValue(newValue, forKey: "hpCost")
905 | }
906 | }
907 |
908 | public var effect: String? {
909 | get {
910 | return resultMap["effect"] as? String
911 | }
912 | set {
913 | resultMap.updateValue(newValue, forKey: "effect")
914 | }
915 | }
916 | }
917 | }
918 |
--------------------------------------------------------------------------------
/Modules/Models/Schema/introspection_response.json:
--------------------------------------------------------------------------------
1 | {"data":{"__schema":{"queryType":{"name":"Query"},"mutationType":null,"subscriptionType":null,"types":[{"kind":"OBJECT","name":"ScallingEntry","description":null,"fields":[{"name":"scalling","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"String","description":"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.","fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AttributeEntry","description":null,"fields":[{"name":"amount","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"Int","description":"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.","fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Ammo","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"attackPower","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AttributeEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"passive","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"ID","description":"The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.","fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Armor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"category","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dmgNegation","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AttributeEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"resistance","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AttributeEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"weight","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AshOfWar","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"affinity","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"skill","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Boss","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"drops","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"healthPoints","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ClassStats","description":null,"fields":[{"name":"level","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"vigor","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"mind","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endurance","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"strenght","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dexterity","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"inteligence","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"faith","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"arcane","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Class","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"stats","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"ClassStats","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Creature","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"drops","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Incantation","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"cost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"slots","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"effects","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"requires","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AttributeEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Item","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"effect","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Location","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Npc","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"quote","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"role","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Shield","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"attack","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AttributeEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"defence","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AttributeEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scalesWith","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"ScallingEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"requiredAttributes","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AttributeEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"category","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"weight","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Sorcery","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"cost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"slots","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"effects","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"requires","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AttributeEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Spirit","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fpCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"hpCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"effect","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Talisman","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"effect","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Weapon","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"attack","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AttributeEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"defence","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AttributeEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scalesWith","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"ScallingEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"requiredAttributes","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AttributeEntry","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"category","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"weight","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Query","description":null,"fields":[{"name":"ammo","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"type","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"passive","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Ammo","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAmmo","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Ammo","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"armor","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"category","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"weight","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Armor","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getArmor","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Armor","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ashOfWar","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"affinity","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"skill","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AshOfWar","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAshOfWar","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AshOfWar","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"boss","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"location","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"healthPoints","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Boss","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getBoss","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Boss","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"class","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Class","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getClass","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Class","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"creature","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"location","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Creature","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getCreature","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Creature","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"incantation","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"type","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"cost","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"slots","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Incantation","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getIncantation","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Incantation","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"item","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"effect","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Item","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getItem","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Item","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getLocation","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"npc","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"quote","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"location","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"role","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Npc","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getNpc","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Npc","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shield","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"category","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"weight","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Shield","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getShield","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Shield","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"sorcery","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"type","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"cost","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"slots","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Sorcery","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getSorcery","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Sorcery","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"spirit","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"fpCost","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"hpCost","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"effect","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Spirit","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getSpirit","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Spirit","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"talisman","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"effect","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Talisman","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getTalisman","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Talisman","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"weapon","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null},{"name":"name","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"category","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null},{"name":"weight","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"page","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0"},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Weapon","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWeapon","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Weapon","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"Boolean","description":"The `Boolean` scalar type represents `true` or `false`.","fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__Schema","description":"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.","fields":[{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"types","description":"A list of all types supported by this server.","args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"queryType","description":"The type that query operations will be rooted at.","args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"mutationType","description":"If this server supports mutation, the type that mutation operations will be rooted at.","args":[],"type":{"kind":"OBJECT","name":"__Type","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"subscriptionType","description":"If this server support subscription, the type that subscription operations will be rooted at.","args":[],"type":{"kind":"OBJECT","name":"__Type","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"directives","description":"A list of all directives supported by this server.","args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Directive","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__Type","description":"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.","fields":[{"name":"kind","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"__TypeKind","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"specifiedByURL","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fields","description":null,"args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false"}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Field","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"interfaces","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"possibleTypes","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"enumValues","description":null,"args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false"}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__EnumValue","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"inputFields","description":null,"args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false"}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__InputValue","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"ofType","description":null,"args":[],"type":{"kind":"OBJECT","name":"__Type","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"__TypeKind","description":"An enum describing what kind of type a given `__Type` is.","fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"SCALAR","description":"Indicates this type is a scalar.","isDeprecated":false,"deprecationReason":null},{"name":"OBJECT","description":"Indicates this type is an object. `fields` and `interfaces` are valid fields.","isDeprecated":false,"deprecationReason":null},{"name":"INTERFACE","description":"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.","isDeprecated":false,"deprecationReason":null},{"name":"UNION","description":"Indicates this type is a union. `possibleTypes` is a valid field.","isDeprecated":false,"deprecationReason":null},{"name":"ENUM","description":"Indicates this type is an enum. `enumValues` is a valid field.","isDeprecated":false,"deprecationReason":null},{"name":"INPUT_OBJECT","description":"Indicates this type is an input object. `inputFields` is a valid field.","isDeprecated":false,"deprecationReason":null},{"name":"LIST","description":"Indicates this type is a list. `ofType` is a valid field.","isDeprecated":false,"deprecationReason":null},{"name":"NON_NULL","description":"Indicates this type is a non-null. `ofType` is a valid field.","isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"__Field","description":"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.","fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"args","description":null,"args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false"}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__InputValue","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isDeprecated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deprecationReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__InputValue","description":"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.","fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"defaultValue","description":"A GraphQL-formatted string representing the default value for this input value.","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isDeprecated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deprecationReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__EnumValue","description":"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.","fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isDeprecated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deprecationReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__Directive","description":"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.","fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isRepeatable","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"__DirectiveLocation","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"args","description":null,"args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false"}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__InputValue","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"__DirectiveLocation","description":"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.","fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"QUERY","description":"Location adjacent to a query operation.","isDeprecated":false,"deprecationReason":null},{"name":"MUTATION","description":"Location adjacent to a mutation operation.","isDeprecated":false,"deprecationReason":null},{"name":"SUBSCRIPTION","description":"Location adjacent to a subscription operation.","isDeprecated":false,"deprecationReason":null},{"name":"FIELD","description":"Location adjacent to a field.","isDeprecated":false,"deprecationReason":null},{"name":"FRAGMENT_DEFINITION","description":"Location adjacent to a fragment definition.","isDeprecated":false,"deprecationReason":null},{"name":"FRAGMENT_SPREAD","description":"Location adjacent to a fragment spread.","isDeprecated":false,"deprecationReason":null},{"name":"INLINE_FRAGMENT","description":"Location adjacent to an inline fragment.","isDeprecated":false,"deprecationReason":null},{"name":"VARIABLE_DEFINITION","description":"Location adjacent to a variable definition.","isDeprecated":false,"deprecationReason":null},{"name":"SCHEMA","description":"Location adjacent to a schema definition.","isDeprecated":false,"deprecationReason":null},{"name":"SCALAR","description":"Location adjacent to a scalar definition.","isDeprecated":false,"deprecationReason":null},{"name":"OBJECT","description":"Location adjacent to an object type definition.","isDeprecated":false,"deprecationReason":null},{"name":"FIELD_DEFINITION","description":"Location adjacent to a field definition.","isDeprecated":false,"deprecationReason":null},{"name":"ARGUMENT_DEFINITION","description":"Location adjacent to an argument definition.","isDeprecated":false,"deprecationReason":null},{"name":"INTERFACE","description":"Location adjacent to an interface definition.","isDeprecated":false,"deprecationReason":null},{"name":"UNION","description":"Location adjacent to a union definition.","isDeprecated":false,"deprecationReason":null},{"name":"ENUM","description":"Location adjacent to an enum definition.","isDeprecated":false,"deprecationReason":null},{"name":"ENUM_VALUE","description":"Location adjacent to an enum value definition.","isDeprecated":false,"deprecationReason":null},{"name":"INPUT_OBJECT","description":"Location adjacent to an input object type definition.","isDeprecated":false,"deprecationReason":null},{"name":"INPUT_FIELD_DEFINITION","description":"Location adjacent to an input object field definition.","isDeprecated":false,"deprecationReason":null}],"possibleTypes":null}],"directives":[{"name":"include","description":"Directs the executor to include this field or fragment only when the `if` argument is true.","locations":["FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT"],"args":[{"name":"if","description":"Included when true.","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null}]},{"name":"skip","description":"Directs the executor to skip this field or fragment when the `if` argument is true.","locations":["FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT"],"args":[{"name":"if","description":"Skipped when true.","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null}]},{"name":"deprecated","description":"Marks an element of a GraphQL schema as no longer supported.","locations":["FIELD_DEFINITION","ARGUMENT_DEFINITION","INPUT_FIELD_DEFINITION","ENUM_VALUE"],"args":[{"name":"reason","description":"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).","type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":"\"No longer supported\""}]},{"name":"specifiedBy","description":"Exposes a URL that specifies the behavior of this scalar.","locations":["SCALAR"],"args":[{"name":"url","description":"The URL that specifies the behavior of this scalar.","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}]}]}}}
2 |
--------------------------------------------------------------------------------