Skip to content

Commit fcb2ce6

Browse files
authored
Merge pull request #1735 from AnthonyMDev/animalkingdomAPI
Add AnimalKingdom API
2 parents e84e86b + f2c6d3f commit fcb2ce6

20 files changed

Lines changed: 783 additions & 6 deletions

Apollo.xcodeproj/project.pbxproj

Lines changed: 183 additions & 6 deletions
Large diffs are not rendered by default.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1240"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "DE3C7A00260A6B9800D2F4FF"
18+
BuildableName = "AnimalKingdomAPI.framework"
19+
BlueprintName = "AnimalKingdomAPI"
20+
ReferencedContainer = "container:Apollo.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
</LaunchAction>
44+
<ProfileAction
45+
buildConfiguration = "Release"
46+
shouldUseLaunchSchemeArgsEnv = "YES"
47+
savedToolIdentifier = ""
48+
useCustomWorkingDirectory = "NO"
49+
debugDocumentVersioning = "YES">
50+
<MacroExpansion>
51+
<BuildableReference
52+
BuildableIdentifier = "primary"
53+
BlueprintIdentifier = "DE3C7A00260A6B9800D2F4FF"
54+
BuildableName = "AnimalKingdomAPI.framework"
55+
BlueprintName = "AnimalKingdomAPI"
56+
ReferencedContainer = "container:Apollo.xcodeproj">
57+
</BuildableReference>
58+
</MacroExpansion>
59+
</ProfileAction>
60+
<AnalyzeAction
61+
buildConfiguration = "Debug">
62+
</AnalyzeAction>
63+
<ArchiveAction
64+
buildConfiguration = "Release"
65+
revealArchiveInOrganizer = "YES">
66+
</ArchiveAction>
67+
</Scheme>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#include "../Shared/Workspace-Universal-Framework.xcconfig"
2+
3+
INFOPLIST_FILE = Sources/AnimalKingdomAPI/Info.plist

Package.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ let package = Package(
112112
exclude: [
113113
"Info.plist"
114114
]),
115+
.target(
116+
name: "AnimalKingdomAPI",
117+
dependencies: [
118+
"ApolloCore",
119+
],
120+
exclude: [
121+
"Info.plist",
122+
"graphql"
123+
]),
115124
.target(
116125
name: "GitHubAPI",
117126
dependencies: [
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#import <Foundation/Foundation.h>
2+
3+
//! Project version number for AnimalKingdomAPI.
4+
FOUNDATION_EXPORT double AnimalKingdomAPIVersionNumber;
5+
6+
//! Project version string for AnimalKingdomAPI.
7+
FOUNDATION_EXPORT const unsigned char AnimalKingdomAPIVersionString[];
8+
9+
// In this header, you should import all the public headers of your framework using statements like #import <AnimalKingdomAPI/PublicHeader.h>
10+
11+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleVersion</key>
20+
<string>$(CURRENT_PROJECT_VERSION)</string>
21+
</dict>
22+
</plist>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
query AllAnimals {
2+
allAnimals {
3+
height {
4+
feet
5+
inches
6+
}
7+
...HeightInMeters
8+
...WarmBloodedDetails
9+
species
10+
skinCovering
11+
... on Pet {
12+
...PetDetails
13+
...WarmBloodedDetails
14+
... on Animal {
15+
height {
16+
relativeSize
17+
centimeters
18+
}
19+
}
20+
}
21+
... on Cat {
22+
isJellicle
23+
}
24+
... on ClassroomPet {
25+
... on Bird {
26+
wingspan
27+
}
28+
}
29+
predators {
30+
species
31+
... on WarmBlooded {
32+
...WarmBloodedDetails
33+
laysEggs
34+
}
35+
}
36+
}
37+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
query ClassroomPets {
2+
classroomPets {
3+
...ClassroomPetDetails
4+
}
5+
}
6+
7+
query ClassroomPetsWithSubtypes {
8+
classroomPets @generateSubtypeEnum {
9+
...ClassroomPetDetails
10+
}
11+
}
12+
13+
fragment ClassroomPetDetails on ClassroomPet {
14+
... on Animal {
15+
species
16+
}
17+
... on Pet {
18+
humanName
19+
}
20+
... on WarmBlooded {
21+
laysEggs
22+
}
23+
... on Cat {
24+
bodyTemperature
25+
isJellicle
26+
}
27+
... on Bird {
28+
wingspan
29+
}
30+
... on PetRock {
31+
favoriteToy
32+
}
33+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fragment HeightInMeters on Animal {
2+
height {
3+
meters
4+
}
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fragment PetDetails on Pet {
2+
humanName
3+
favoriteToy
4+
owner {
5+
firstName
6+
}
7+
}

0 commit comments

Comments
 (0)