├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml └── workflows │ └── mobile.yml ├── .gitignore ├── Directory.Build.props ├── LICENSE ├── README.md ├── SimpleXamarinGraphQL.Android ├── Assets │ └── AboutAssets.txt ├── MainActivity.cs ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs ├── Resources │ ├── AboutResources.txt │ ├── layout │ │ ├── Tabbar.xml │ │ └── Toolbar.xml │ ├── mipmap-anydpi-v26 │ │ ├── icon.xml │ │ └── icon_round.xml │ ├── mipmap-hdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-mdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-xhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-xxhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-xxxhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ └── values │ │ ├── colors.xml │ │ └── styles.xml └── SimpleXamarinGraphQL.Android.csproj ├── SimpleXamarinGraphQL.iOS ├── AppDelegate.cs ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon1024.png │ │ ├── Icon120.png │ │ ├── Icon152.png │ │ ├── Icon167.png │ │ ├── Icon180.png │ │ ├── Icon20.png │ │ ├── Icon29.png │ │ ├── Icon40.png │ │ ├── Icon58.png │ │ ├── Icon60.png │ │ ├── Icon76.png │ │ ├── Icon80.png │ │ └── Icon87.png ├── CustomRenderers │ └── EntryCustomRederer.cs ├── Entitlements.plist ├── Info.plist ├── Main.cs ├── Properties │ └── AssemblyInfo.cs ├── Resources │ ├── Default-568h@2x.png │ ├── Default-Portrait.png │ ├── Default-Portrait@2x.png │ ├── Default.png │ ├── Default@2x.png │ └── LaunchScreen.storyboard └── SimpleXamarinGraphQL.iOS.csproj ├── SimpleXamarinGraphQL.sln └── SimpleXamarinGraphQL ├── App.cs ├── Constants └── GitHubConstants.cs ├── Models ├── Followers.cs ├── GitHubUser.cs └── GitHubUserGraphQLResponse.cs ├── Pages ├── BaseContentPage.cs └── GraphQLPage.cs ├── Services └── GitHubGraphQLService.cs ├── SimpleXamarinGraphQL.csproj └── ViewModels ├── BaseViewModel.cs └── GraphQLViewModel.cs /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github:[brminnick] 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "nuget" 9 | directory: "/" 10 | schedule: 11 | interval: "daily" 12 | -------------------------------------------------------------------------------- /.github/workflows/mobile.yml: -------------------------------------------------------------------------------- 1 | name: Mobile 2 | 3 | on: 4 | push: 5 | branches: 6 | - "main" 7 | pull_request: 8 | branches: 9 | - "*" 10 | 11 | jobs: 12 | Build_Android: 13 | runs-on: macos-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v1 17 | 18 | - name: Restore NuGet 19 | run: | 20 | nuget restore 21 | 22 | - name: Inject Token 23 | env: 24 | TOKEN: ${{ secrets.TOKEN }} 25 | 26 | run: | 27 | GitHubConstantsFile=`find . -name GitHubConstants.cs | head -1` 28 | echo GitHubConstantsFile = $GitHubConstantsFile 29 | 30 | sed -i '' "s/PersonalAccessToken = \"\"/PersonalAccessToken = \"$TOKEN\"/g" "$GitHubConstantsFile" 31 | sed -i '' "s/#error Missing Token/\/\/##error Missing Token/g" "$GitHubConstantsFile" 32 | 33 | - name: Build Android App 34 | run: | 35 | msbuild ./SimpleXamarinGraphQL.Android/SimpleXamarinGraphQL.Android.csproj /verbosity:normal /p:Configuration=Release 36 | 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/xamarinstudio,visualstudio,visualstudiocode,xcode,android,macos,csharp,f#,fastlane,java,jetbrains,linux,monodevelop,objective-c,swift,sublimetext,unity 3 | 4 | ### fastlane ### 5 | # fastlane - A streamlined workflow tool for Cocoa deployment 6 | 7 | # fastlane specific 8 | fastlane/report.xml 9 | 10 | # deliver temporary files 11 | fastlane/Preview.html 12 | 13 | # snapshot generated screenshots 14 | fastlane/screenshots/**/*.png 15 | fastlane/screenshots/screenshots.html 16 | 17 | # scan temporary files 18 | fastlane/test_output 19 | 20 | 21 | ### XamarinStudio ### 22 | bin/ 23 | obj/ 24 | *.userprefs 25 | 26 | 27 | ### VisualStudioCode ### 28 | .vscode/* 29 | !.vscode/settings.json 30 | !.vscode/tasks.json 31 | !.vscode/launch.json 32 | !.vscode/extensions.json 33 | 34 | 35 | ### Xcode ### 36 | # Xcode 37 | # 38 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 39 | 40 | ## Build generated 41 | build/ 42 | DerivedData/ 43 | 44 | ## Various settings 45 | *.pbxuser 46 | !default.pbxuser 47 | *.mode1v3 48 | !default.mode1v3 49 | *.mode2v3 50 | !default.mode2v3 51 | *.perspectivev3 52 | !default.perspectivev3 53 | xcuserdata/ 54 | 55 | ## Other 56 | *.moved-aside 57 | *.xccheckout 58 | *.xcscmblueprint 59 | 60 | 61 | ### Android ### 62 | # Built application files 63 | *.apk 64 | *.ap_ 65 | 66 | # Files for the ART/Dalvik VM 67 | *.dex 68 | 69 | # Java class files 70 | *.class 71 | 72 | # Generated files 73 | gen/ 74 | out/ 75 | Resource.designer.cs 76 | 77 | # Gradle files 78 | .gradle/ 79 | 80 | # Local configuration file (sdk path, etc) 81 | local.properties 82 | 83 | # Proguard folder generated by Eclipse 84 | proguard/ 85 | 86 | # Log Files 87 | *.log 88 | 89 | # Android Studio Navigation editor temp files 90 | .navigation/ 91 | 92 | # Android Studio captures folder 93 | captures/ 94 | 95 | # Intellij 96 | *.iml 97 | .idea/workspace.xml 98 | .idea/tasks.xml 99 | .idea/libraries 100 | 101 | # Keystore files 102 | *.jks 103 | 104 | # External native build folder generated in Android Studio 2.2 and later 105 | .externalNativeBuild 106 | 107 | ### Android Patch ### 108 | gen-external-apklibs 109 | 110 | 111 | ### macOS ### 112 | *.DS_Store 113 | .AppleDouble 114 | .LSOverride 115 | 116 | # Icon must end with two \r 117 | Icon 118 | # Thumbnails 119 | ._* 120 | # Files that might appear in the root of a volume 121 | .DocumentRevisions-V100 122 | .fseventsd 123 | .Spotlight-V100 124 | .TemporaryItems 125 | .Trashes 126 | .VolumeIcon.icns 127 | .com.apple.timemachine.donotpresent 128 | # Directories potentially created on remote AFP share 129 | .AppleDB 130 | .AppleDesktop 131 | Network Trash Folder 132 | Temporary Items 133 | .apdisk 134 | 135 | 136 | ### Csharp ### 137 | ## Ignore Visual Studio temporary files, build results, and 138 | ## files generated by popular Visual Studio add-ons. 139 | ## 140 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 141 | 142 | # User-specific files 143 | *.suo 144 | *.user 145 | *.userosscache 146 | *.sln.docstates 147 | *.vcxproj.filters 148 | 149 | # User-specific files (MonoDevelop/Xamarin Studio) 150 | 151 | # Build results 152 | [Dd]ebug/ 153 | [Dd]ebugPublic/ 154 | [Rr]elease/ 155 | [Rr]eleases/ 156 | x64/ 157 | x86/ 158 | bld/ 159 | [Bb]in/ 160 | [Oo]bj/ 161 | [Ll]og/ 162 | 163 | # Visual Studio 2015 cache/options directory 164 | .vs/ 165 | # Uncomment if you have tasks that create the project's static files in wwwroot 166 | #wwwroot/ 167 | 168 | # MSTest test Results 169 | [Tt]est[Rr]esult*/ 170 | [Bb]uild[Ll]og.* 171 | 172 | # NUNIT 173 | *.VisualState.xml 174 | TestResult.xml 175 | 176 | # Build Results of an ATL Project 177 | [Dd]ebugPS/ 178 | [Rr]eleasePS/ 179 | dlldata.c 180 | 181 | # .NET Core 182 | project.lock.json 183 | project.fragment.lock.json 184 | artifacts/ 185 | **/Properties/launchSettings.json 186 | 187 | *_i.c 188 | *_p.c 189 | *_i.h 190 | *.ilk 191 | *.meta 192 | *.obj 193 | *.pch 194 | *.pdb 195 | *.pgc 196 | *.pgd 197 | *.rsp 198 | *.sbr 199 | *.tlb 200 | *.tli 201 | *.tlh 202 | *.tmp 203 | *.tmp_proj 204 | *.vspscc 205 | *.vssscc 206 | .builds 207 | *.pidb 208 | *.svclog 209 | *.scc 210 | 211 | # Chutzpah Test files 212 | _Chutzpah* 213 | 214 | # Visual C++ cache files 215 | ipch/ 216 | *.aps 217 | *.ncb 218 | *.opendb 219 | *.opensdf 220 | *.sdf 221 | *.cachefile 222 | *.VC.db 223 | *.VC.VC.opendb 224 | 225 | # Visual Studio profiler 226 | *.psess 227 | *.vsp 228 | *.vspx 229 | *.sap 230 | 231 | # TFS 2012 Local Workspace 232 | $tf/ 233 | 234 | # Guidance Automation Toolkit 235 | *.gpState 236 | 237 | # ReSharper is a .NET coding add-in 238 | _ReSharper*/ 239 | *.[Rr]e[Ss]harper 240 | *.DotSettings.user 241 | 242 | # JustCode is a .NET coding add-in 243 | .JustCode 244 | 245 | # TeamCity is a build add-in 246 | _TeamCity* 247 | 248 | # DotCover is a Code Coverage Tool 249 | *.dotCover 250 | 251 | # Visual Studio code coverage results 252 | *.coverage 253 | *.coveragexml 254 | 255 | # NCrunch 256 | _NCrunch_* 257 | .*crunch*.local.xml 258 | nCrunchTemp_* 259 | 260 | # MightyMoose 261 | *.mm.* 262 | AutoTest.Net/ 263 | 264 | # Web workbench (sass) 265 | .sass-cache/ 266 | 267 | # Installshield output folder 268 | [Ee]xpress/ 269 | 270 | # DocProject is a documentation generator add-in 271 | DocProject/buildhelp/ 272 | DocProject/Help/*.HxT 273 | DocProject/Help/*.HxC 274 | DocProject/Help/*.hhc 275 | DocProject/Help/*.hhk 276 | DocProject/Help/*.hhp 277 | DocProject/Help/Html2 278 | DocProject/Help/html 279 | 280 | # Click-Once directory 281 | publish/ 282 | 283 | # Publish Web Output 284 | *.[Pp]ublish.xml 285 | *.azurePubxml 286 | # TODO: Comment the next line if you want to checkin your web deploy settings 287 | # but database connection strings (with potential passwords) will be unencrypted 288 | *.pubxml 289 | *.publishproj 290 | 291 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 292 | # checkin your Azure Web App publish settings, but sensitive information contained 293 | # in these scripts will be unencrypted 294 | PublishScripts/ 295 | 296 | # NuGet Packages 297 | *.nupkg 298 | # The packages folder can be ignored because of Package Restore 299 | **/packages/* 300 | # except build/, which is used as an MSBuild target. 301 | !**/packages/build/ 302 | # Uncomment if necessary however generally it will be regenerated when needed 303 | #!**/packages/repositories.config 304 | # NuGet v3's project.json files produces more ignoreable files 305 | *.nuget.props 306 | *.nuget.targets 307 | 308 | # Microsoft Azure Build Output 309 | csx/ 310 | *.build.csdef 311 | 312 | # Microsoft Azure Emulator 313 | ecf/ 314 | rcf/ 315 | 316 | # Windows Store app package directories and files 317 | AppPackages/ 318 | BundleArtifacts/ 319 | _pkginfo.txt 320 | 321 | # Visual Studio cache files 322 | # files ending in .cache can be ignored 323 | *.[Cc]ache 324 | # but keep track of directories ending in .cache 325 | !*.[Cc]ache/ 326 | 327 | # Others 328 | ClientBin/ 329 | ~$* 330 | *~ 331 | *.dbmdl 332 | *.dbproj.schemaview 333 | *.jfm 334 | *.pfx 335 | *.publishsettings 336 | node_modules/ 337 | orleans.codegen.cs 338 | 339 | # Since there are multiple workflows, uncomment next line to ignore bower_components 340 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 341 | #bower_components/ 342 | 343 | # RIA/Silverlight projects 344 | Generated_Code/ 345 | 346 | # Backup & report files from converting an old project file 347 | # to a newer Visual Studio version. Backup files are not needed, 348 | # because we have git ;-) 349 | _UpgradeReport_Files/ 350 | Backup*/ 351 | UpgradeLog*.XML 352 | UpgradeLog*.htm 353 | 354 | # SQL Server files 355 | *.mdf 356 | *.ldf 357 | 358 | # Business Intelligence projects 359 | *.rdl.data 360 | *.bim.layout 361 | *.bim_*.settings 362 | 363 | # Microsoft Fakes 364 | FakesAssemblies/ 365 | 366 | # GhostDoc plugin setting file 367 | *.GhostDoc.xml 368 | 369 | # Node.js Tools for Visual Studio 370 | .ntvs_analysis.dat 371 | 372 | # Visual Studio 6 build log 373 | *.plg 374 | 375 | # Visual Studio 6 workspace options file 376 | *.opt 377 | 378 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 379 | *.vbw 380 | 381 | # Visual Studio LightSwitch build output 382 | **/*.HTMLClient/GeneratedArtifacts 383 | **/*.DesktopClient/GeneratedArtifacts 384 | **/*.DesktopClient/ModelManifest.xml 385 | **/*.Server/GeneratedArtifacts 386 | **/*.Server/ModelManifest.xml 387 | _Pvt_Extensions 388 | 389 | # Paket dependency manager 390 | .paket/paket.exe 391 | paket-files/ 392 | 393 | # FAKE - F# Make 394 | .fake/ 395 | 396 | # JetBrains Rider 397 | .idea/ 398 | *.sln.iml 399 | 400 | # CodeRush 401 | .cr/ 402 | 403 | # Python Tools for Visual Studio (PTVS) 404 | __pycache__/ 405 | *.pyc 406 | 407 | # Cake - Uncomment if you are using it 408 | # tools/ 409 | 410 | 411 | ### F# ### 412 | lib/debug 413 | lib/release 414 | Debug 415 | obj 416 | bin 417 | *.exe 418 | !.paket/paket.bootstrapper.exe 419 | 420 | 421 | ### SublimeText ### 422 | # cache files for sublime text 423 | *.tmlanguage.cache 424 | *.tmPreferences.cache 425 | *.stTheme.cache 426 | 427 | # workspace files are user-specific 428 | *.sublime-workspace 429 | 430 | # project files should be checked into the repository, unless a significant 431 | # proportion of contributors will probably not be using SublimeText 432 | # *.sublime-project 433 | 434 | # sftp configuration file 435 | sftp-config.json 436 | 437 | # Package control specific files 438 | Package Control.last-run 439 | Package Control.ca-list 440 | Package Control.ca-bundle 441 | Package Control.system-ca-bundle 442 | Package Control.cache/ 443 | Package Control.ca-certs/ 444 | bh_unicode_properties.cache 445 | 446 | # Sublime-github package stores a github token in this file 447 | # https://packagecontrol.io/packages/sublime-github 448 | GitHub.sublime-settings 449 | 450 | 451 | ### Swift ### 452 | # Xcode 453 | # 454 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 455 | 456 | ## Build generated 457 | 458 | ## Various settings 459 | 460 | ## Other 461 | *.xcuserstate 462 | 463 | ## Obj-C/Swift specific 464 | *.hmap 465 | *.ipa 466 | *.dSYM.zip 467 | *.dSYM 468 | 469 | ## Playgrounds 470 | timeline.xctimeline 471 | playground.xcworkspace 472 | 473 | # Swift Package Manager 474 | # 475 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 476 | # Packages/ 477 | .build/ 478 | 479 | # CocoaPods 480 | # 481 | # We recommend against adding the Pods directory to your .gitignore. However 482 | # you should judge for yourself, the pros and cons are mentioned at: 483 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 484 | # 485 | # Pods/ 486 | 487 | # Carthage 488 | # 489 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 490 | # Carthage/Checkouts 491 | 492 | Carthage/Build 493 | 494 | # fastlane 495 | # 496 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 497 | # screenshots whenever they are needed. 498 | # For more information about the recommended setup visit: 499 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 500 | 501 | fastlane/screenshots 502 | 503 | 504 | ### JetBrains ### 505 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 506 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 507 | 508 | # User-specific stuff: 509 | 510 | # Sensitive or high-churn files: 511 | .idea/dataSources/ 512 | .idea/dataSources.ids 513 | .idea/dataSources.xml 514 | .idea/dataSources.local.xml 515 | .idea/sqlDataSources.xml 516 | .idea/dynamic.xml 517 | .idea/uiDesigner.xml 518 | 519 | # Gradle: 520 | .idea/gradle.xml 521 | 522 | # Mongo Explorer plugin: 523 | .idea/mongoSettings.xml 524 | 525 | ## File-based project format: 526 | *.iws 527 | 528 | ## Plugin-specific files: 529 | 530 | # IntelliJ 531 | /out/ 532 | 533 | # mpeltonen/sbt-idea plugin 534 | .idea_modules/ 535 | 536 | # JIRA plugin 537 | atlassian-ide-plugin.xml 538 | 539 | # Crashlytics plugin (for Android Studio and IntelliJ) 540 | com_crashlytics_export_strings.xml 541 | crashlytics.properties 542 | crashlytics-build.properties 543 | fabric.properties 544 | 545 | ### JetBrains Patch ### 546 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 547 | 548 | # *.iml 549 | # modules.xml 550 | # .idea/misc.xml 551 | # *.ipr 552 | 553 | 554 | ### Linux ### 555 | 556 | # temporary files which can be created if a process still has a handle open of a deleted file 557 | .fuse_hidden* 558 | 559 | # KDE directory preferences 560 | .directory 561 | 562 | # Linux trash folder which might appear on any partition or disk 563 | .Trash-* 564 | 565 | # .nfs files are created when an open file is removed but is still being accessed 566 | .nfs* 567 | 568 | 569 | ### MonoDevelop ### 570 | #User Specific 571 | *.usertasks 572 | 573 | #Mono Project Files 574 | *.resources 575 | test-results/ 576 | 577 | 578 | ### Objective-C ### 579 | # Xcode 580 | # 581 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 582 | 583 | ## Build generated 584 | 585 | ## Various settings 586 | 587 | ## Other 588 | 589 | ## Obj-C/Swift specific 590 | 591 | # CocoaPods 592 | # 593 | # We recommend against adding the Pods directory to your .gitignore. However 594 | # you should judge for yourself, the pros and cons are mentioned at: 595 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 596 | # 597 | # Pods/ 598 | 599 | # Carthage 600 | # 601 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 602 | # Carthage/Checkouts 603 | 604 | 605 | # fastlane 606 | # 607 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 608 | # screenshots whenever they are needed. 609 | # For more information about the recommended setup visit: 610 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 611 | 612 | 613 | # Code Injection 614 | # 615 | # After new code Injection tools there's a generated folder /iOSInjectionProject 616 | # https://github.com/johnno1962/injectionforxcode 617 | 618 | iOSInjectionProject/ 619 | 620 | ### Objective-C Patch ### 621 | 622 | 623 | ### Unity ### 624 | /[Ll]ibrary/ 625 | /[Tt]emp/ 626 | /[Oo]bj/ 627 | /[Bb]uild/ 628 | /[Bb]uilds/ 629 | /Assets/AssetStoreTools* 630 | 631 | # Autogenerated VS/MD/Consulo solution and project files 632 | ExportedObj/ 633 | .consulo/*.csproj 634 | .consulo/*.unityproj 635 | .consulo/*.sln 636 | .consulo/*.booproj 637 | .consulo/*.svd 638 | 639 | 640 | # Unity3D generated meta files 641 | *.pidb.meta 642 | 643 | # Unity3D Generated File On Crash Reports 644 | sysinfo.txt 645 | 646 | # Builds 647 | *.unitypackage 648 | 649 | 650 | ### Java ### 651 | 652 | # BlueJ files 653 | *.ctxt 654 | 655 | # Mobile Tools for Java (J2ME) 656 | .mtj.tmp/ 657 | 658 | # Package Files # 659 | *.jar 660 | *.war 661 | *.ear 662 | 663 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 664 | hs_err_pid* 665 | 666 | 667 | ### VisualStudio ### 668 | ## Ignore Visual Studio temporary files, build results, and 669 | ## files generated by popular Visual Studio add-ons. 670 | ## 671 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 672 | 673 | # User-specific files 674 | 675 | # User-specific files (MonoDevelop/Xamarin Studio) 676 | 677 | # Build results 678 | 679 | # Visual Studio 2015 cache/options directory 680 | # Uncomment if you have tasks that create the project's static files in wwwroot 681 | #wwwroot/ 682 | 683 | # MSTest test Results 684 | 685 | # NUNIT 686 | 687 | # Build Results of an ATL Project 688 | 689 | # .NET Core 690 | 691 | 692 | # Chutzpah Test files 693 | 694 | # Visual C++ cache files 695 | 696 | # Visual Studio profiler 697 | 698 | # TFS 2012 Local Workspace 699 | 700 | # Guidance Automation Toolkit 701 | 702 | # ReSharper is a .NET coding add-in 703 | 704 | # JustCode is a .NET coding add-in 705 | 706 | # TeamCity is a build add-in 707 | 708 | # DotCover is a Code Coverage Tool 709 | 710 | # Visual Studio code coverage results 711 | 712 | # NCrunch 713 | 714 | # MightyMoose 715 | 716 | # Web workbench (sass) 717 | 718 | # Installshield output folder 719 | 720 | # DocProject is a documentation generator add-in 721 | 722 | # Click-Once directory 723 | 724 | # Publish Web Output 725 | # TODO: Comment the next line if you want to checkin your web deploy settings 726 | # but database connection strings (with potential passwords) will be unencrypted 727 | 728 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 729 | # checkin your Azure Web App publish settings, but sensitive information contained 730 | # in these scripts will be unencrypted 731 | 732 | # NuGet Packages 733 | # The packages folder can be ignored because of Package Restore 734 | # except build/, which is used as an MSBuild target. 735 | # Uncomment if necessary however generally it will be regenerated when needed 736 | #!**/packages/repositories.config 737 | # NuGet v3's project.json files produces more ignoreable files 738 | 739 | # Microsoft Azure Build Output 740 | 741 | # Microsoft Azure Emulator 742 | 743 | # Windows Store app package directories and files 744 | 745 | # Visual Studio cache files 746 | # files ending in .cache can be ignored 747 | # but keep track of directories ending in .cache 748 | 749 | # Others 750 | 751 | # Since there are multiple workflows, uncomment next line to ignore bower_components 752 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 753 | #bower_components/ 754 | 755 | # RIA/Silverlight projects 756 | 757 | # Backup & report files from converting an old project file 758 | # to a newer Visual Studio version. Backup files are not needed, 759 | # because we have git ;-) 760 | 761 | # SQL Server files 762 | 763 | # Business Intelligence projects 764 | 765 | # Microsoft Fakes 766 | 767 | # GhostDoc plugin setting file 768 | 769 | # Node.js Tools for Visual Studio 770 | 771 | # Visual Studio 6 build log 772 | 773 | # Visual Studio 6 workspace options file 774 | 775 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 776 | 777 | # Visual Studio LightSwitch build output 778 | 779 | # Paket dependency manager 780 | 781 | # FAKE - F# Make 782 | 783 | # JetBrains Rider 784 | 785 | # CodeRush 786 | 787 | # Python Tools for Visual Studio (PTVS) 788 | 789 | # Cake - Uncomment if you are using it 790 | # tools/ 791 | 792 | ### VisualStudio Patch ### 793 | 794 | # End of https://www.gitignore.io/api/xamarinstudio,visualstudio,visualstudiocode,xcode,android,macos,csharp,f#,fastlane,java,jetbrains,linux,monodevelop,objective-c,swift,sublimetext,unity 795 | -------------------------------------------------------------------------------- /Directory.Build.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | latest 5 | enable 6 | nullable 7 | True 8 | false 9 | 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Brandon Minnick 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Mobile](https://github.com/brminnick/SimpleXamarinGraphQL/actions/workflows/mobile.yml/badge.svg)](https://github.com/brminnick/SimpleXamarinGraphQL/actions/workflows/mobile.yml) 2 | 3 | # SimpleXamarinGraphQL 4 | An iOS and Android app built in Xamarin.Forms demonstrating how to interact with GitHub's GraphQL API from a [Xamarin.Forms](https://visualstudio.microsoft.com/xamarin?WT.mc_id=mobile-0000-bramin) app using [GraphQL.Client](https://www.nuget.org/packages/GraphQL.Client/). 5 | 6 | ## Xamarin + GraphQL Recording 7 | 8 | This app was created to accompany my talk on Xamarin + GraphQL. 9 | 10 | The session was delivered at [Xamarin Developer Summit 2019](https://www.codetraveler.io/xamdevsummit-graphql/) and its recording is available on YouTube: https://youtu.be/t1cQsenAmNo?t=18575 11 | 12 | [![Xamarin + GraphQL Video](https://user-images.githubusercontent.com/13558917/61256668-6a8f1780-a722-11e9-97ad-8188ec6eab8f.png)](https://youtu.be/t1cQsenAmNo?t=18575) 13 | 14 | ## Demo 15 | 16 | ![App Demo](https://user-images.githubusercontent.com/13558917/61123995-69809080-a46b-11e9-92c4-c5c0174f4e1a.gif) 17 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with you package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content.PM; 3 | using Android.OS; 4 | 5 | namespace SimpleXamarinGraphQL.Droid 6 | { 7 | [Activity(Label = "SimpleXamarinGraphQL", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 8 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity 9 | { 10 | public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Android.Content.PM.Permission[] grantResults) 11 | { 12 | Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); 13 | 14 | base.OnRequestPermissionsResult(requestCode, permissions, grantResults); 15 | } 16 | 17 | protected override void OnCreate(Bundle savedInstanceState) 18 | { 19 | TabLayoutResource = Resource.Layout.Tabbar; 20 | ToolbarResource = Resource.Layout.Toolbar; 21 | 22 | base.OnCreate(savedInstanceState); 23 | 24 | global::Xamarin.Forms.Forms.Init(this, savedInstanceState); 25 | global::Xamarin.Essentials.Platform.Init(this, savedInstanceState); 26 | LoadApplication(new App()); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("SimpleXamarinGraphQL.Android")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("SimpleXamarinGraphQL.Android")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | 32 | // Add some common permissions, these can be removed if not needed 33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)] 34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] 35 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.xml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable-hdpi/ 12 | icon.png 13 | 14 | drawable-ldpi/ 15 | icon.png 16 | 17 | drawable-mdpi/ 18 | icon.png 19 | 20 | layout/ 21 | main.xml 22 | 23 | values/ 24 | strings.xml 25 | 26 | In order to get the build system to recognize Android resources, set the build action to 27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 28 | instead operate on resource IDs. When you compile an Android application that uses resources, 29 | the build system will package the resources for distribution and generate a class called 30 | "Resource" that contains the tokens for each one of the resources included. For example, 31 | for the above Resources layout, this is what the Resource class would expose: 32 | 33 | public class Resource { 34 | public class drawable { 35 | public const int icon = 0x123; 36 | } 37 | 38 | public class layout { 39 | public const int main = 0x456; 40 | } 41 | 42 | public class strings { 43 | public const int first_string = 0xabc; 44 | public const int second_string = 0xbcd; 45 | } 46 | } 47 | 48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main 49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first 50 | string in the dictionary file values/strings.xml. 51 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/layout/Tabbar.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/layout/Toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/mipmap-anydpi-v26/icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/mipmap-anydpi-v26/icon_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/mipmap-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.Android/Resources/mipmap-hdpi/icon.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/mipmap-hdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.Android/Resources/mipmap-hdpi/launcher_foreground.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/mipmap-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.Android/Resources/mipmap-mdpi/icon.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/mipmap-mdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.Android/Resources/mipmap-mdpi/launcher_foreground.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/mipmap-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.Android/Resources/mipmap-xhdpi/icon.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/mipmap-xhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.Android/Resources/mipmap-xhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/mipmap-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.Android/Resources/mipmap-xxhdpi/icon.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/mipmap-xxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.Android/Resources/mipmap-xxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/mipmap-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.Android/Resources/mipmap-xxxhdpi/icon.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | #3F51B5 5 | #303F9F 6 | #FF4081 7 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 24 | 27 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.Android/SimpleXamarinGraphQL.Android.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F} 7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 8 | {c9e5eea5-ca05-42a1-839b-61506e0a37df} 9 | Library 10 | SimpleXamarinGraphQL.Droid 11 | SimpleXamarinGraphQL.Android 12 | True 13 | Resources\Resource.designer.cs 14 | Resource 15 | Properties\AndroidManifest.xml 16 | Resources 17 | Assets 18 | v13.0 19 | true 20 | Xamarin.Android.Net.AndroidClientHandler 21 | true 22 | 23 | 24 | 25 | 26 | true 27 | portable 28 | false 29 | bin\Debug 30 | DEBUG; 31 | prompt 32 | 4 33 | d8 34 | true 35 | 36 | 37 | true 38 | portable 39 | true 40 | bin\Release 41 | prompt 42 | 4 43 | true 44 | false 45 | true 46 | true 47 | true 48 | true 49 | d8 50 | r8 51 | armeabi-v7a 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | {3850CB98-5F7D-4A57-946E-A244B6686397} 108 | SimpleXamarinGraphQL 109 | 110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | using UIKit; 3 | 4 | namespace SimpleXamarinGraphQL.iOS 5 | { 6 | [Register(nameof(AppDelegate))] 7 | public class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 8 | { 9 | public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions) 10 | { 11 | global::Xamarin.Forms.Forms.Init(); 12 | LoadApplication(new App()); 13 | 14 | return base.FinishedLaunching(uiApplication, launchOptions); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "scale": "2x", 5 | "size": "20x20", 6 | "idiom": "iphone", 7 | "filename": "Icon40.png" 8 | }, 9 | { 10 | "scale": "3x", 11 | "size": "20x20", 12 | "idiom": "iphone", 13 | "filename": "Icon60.png" 14 | }, 15 | { 16 | "scale": "2x", 17 | "size": "29x29", 18 | "idiom": "iphone", 19 | "filename": "Icon58.png" 20 | }, 21 | { 22 | "scale": "3x", 23 | "size": "29x29", 24 | "idiom": "iphone", 25 | "filename": "Icon87.png" 26 | }, 27 | { 28 | "scale": "2x", 29 | "size": "40x40", 30 | "idiom": "iphone", 31 | "filename": "Icon80.png" 32 | }, 33 | { 34 | "scale": "3x", 35 | "size": "40x40", 36 | "idiom": "iphone", 37 | "filename": "Icon120.png" 38 | }, 39 | { 40 | "scale": "2x", 41 | "size": "60x60", 42 | "idiom": "iphone", 43 | "filename": "Icon120.png" 44 | }, 45 | { 46 | "scale": "3x", 47 | "size": "60x60", 48 | "idiom": "iphone", 49 | "filename": "Icon180.png" 50 | }, 51 | { 52 | "scale": "1x", 53 | "size": "20x20", 54 | "idiom": "ipad", 55 | "filename": "Icon20.png" 56 | }, 57 | { 58 | "scale": "2x", 59 | "size": "20x20", 60 | "idiom": "ipad", 61 | "filename": "Icon40.png" 62 | }, 63 | { 64 | "scale": "1x", 65 | "size": "29x29", 66 | "idiom": "ipad", 67 | "filename": "Icon29.png" 68 | }, 69 | { 70 | "scale": "2x", 71 | "size": "29x29", 72 | "idiom": "ipad", 73 | "filename": "Icon58.png" 74 | }, 75 | { 76 | "scale": "1x", 77 | "size": "40x40", 78 | "idiom": "ipad", 79 | "filename": "Icon40.png" 80 | }, 81 | { 82 | "scale": "2x", 83 | "size": "40x40", 84 | "idiom": "ipad", 85 | "filename": "Icon80.png" 86 | }, 87 | { 88 | "scale": "1x", 89 | "size": "76x76", 90 | "idiom": "ipad", 91 | "filename": "Icon76.png" 92 | }, 93 | { 94 | "scale": "2x", 95 | "size": "76x76", 96 | "idiom": "ipad", 97 | "filename": "Icon152.png" 98 | }, 99 | { 100 | "scale": "2x", 101 | "size": "83.5x83.5", 102 | "idiom": "ipad", 103 | "filename": "Icon167.png" 104 | }, 105 | { 106 | "scale": "1x", 107 | "size": "1024x1024", 108 | "idiom": "ios-marketing", 109 | "filename": "Icon1024.png" 110 | } 111 | ], 112 | "properties": {}, 113 | "info": { 114 | "version": 1, 115 | "author": "xcode" 116 | } 117 | } -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/CustomRenderers/EntryCustomRederer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Linq; 4 | using SimpleXamarinGraphQL.iOS; 5 | using UIKit; 6 | using Xamarin.Forms; 7 | using Xamarin.Forms.Platform.iOS; 8 | 9 | [assembly: ExportRenderer(typeof(Entry), typeof(EntryCustomRederer))] 10 | namespace SimpleXamarinGraphQL.iOS 11 | { 12 | public class EntryCustomRederer : EntryRenderer 13 | { 14 | protected override void OnElementChanged(ElementChangedEventArgs e) 15 | { 16 | base.OnElementChanged(e); 17 | 18 | if (e.OldElement != null && Control != null) 19 | Control.AllEditingEvents -= HandleAllEditingEvents; 20 | 21 | if (e.NewElement != null && Control != null) 22 | Control.AllEditingEvents += HandleAllEditingEvents; 23 | } 24 | 25 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) 26 | { 27 | base.OnElementPropertyChanged(sender, e); 28 | 29 | if (Control != null) 30 | { 31 | Control.Layer.BorderColor = UIColor.LightGray.CGColor; 32 | Control.Layer.BorderWidth = 0.25f; 33 | Control.Layer.CornerRadius = 5; 34 | } 35 | } 36 | 37 | void HandleAllEditingEvents(object sender, EventArgs e) 38 | { 39 | if (Control.Subviews.OfType().FirstOrDefault() is UIButton clearButton) 40 | SetEntryClearButtonTint(clearButton); 41 | } 42 | 43 | void SetEntryClearButtonTint(in UIButton clearButton) 44 | { 45 | if (clearButton.CurrentImage.ImageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate) is UIImage clearButtonImage) 46 | { 47 | clearButton.SetImage(clearButtonImage, UIControlState.Normal); 48 | clearButton.TintColor = UIColor.DarkGray; 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIDeviceFamily 6 | 7 | 1 8 | 2 9 | 10 | UISupportedInterfaceOrientations 11 | 12 | UIInterfaceOrientationPortrait 13 | 14 | UISupportedInterfaceOrientations~ipad 15 | 16 | UIInterfaceOrientationPortrait 17 | UIInterfaceOrientationPortraitUpsideDown 18 | UIInterfaceOrientationLandscapeLeft 19 | UIInterfaceOrientationLandscapeRight 20 | 21 | MinimumOSVersion 22 | 12.0 23 | CFBundleDisplayName 24 | SimpleXamarinGraphQL 25 | CFBundleIdentifier 26 | com.minnick.SimpleXamarinGraphQL 27 | CFBundleVersion 28 | 1.0 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | CFBundleName 32 | SimpleXamarinGraphQL 33 | XSAppIconAssets 34 | Assets.xcassets/AppIcon.appiconset 35 | UIViewControllerBasedStatusBarAppearance 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | 3 | namespace SimpleXamarinGraphQL.iOS 4 | { 5 | public class Application 6 | { 7 | static void Main(string[] args) => UIApplication.Main(args, null, nameof(AppDelegate)); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleXamarinGraphQL.iOS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleXamarinGraphQL.iOS")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Resources/Default.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCodeTraveler/SimpleXamarinGraphQL/d9cf0eb081cd846ec9d508b93933ff661af1459d/SimpleXamarinGraphQL.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/Resources/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.iOS/SimpleXamarinGraphQL.iOS.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | iPhoneSimulator 6 | 8.0.30703 7 | 2.0 8 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D} 9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | {6143fdea-f3c2-4a09-aafa-6e230626515e} 11 | Exe 12 | SimpleXamarinGraphQL.iOS 13 | Resources 14 | SimpleXamarinGraphQL.iOS 15 | true 16 | NSUrlSessionHandler 17 | true 18 | 19 | 20 | true 21 | full 22 | false 23 | bin\iPhoneSimulator\Debug 24 | DEBUG 25 | prompt 26 | 4 27 | x86_64 28 | None 29 | true 30 | 31 | 32 | none 33 | true 34 | bin\iPhoneSimulator\Release 35 | prompt 36 | 4 37 | None 38 | x86_64 39 | 40 | 41 | true 42 | full 43 | false 44 | bin\iPhone\Debug 45 | DEBUG 46 | prompt 47 | 4 48 | ARM64 49 | iPhone Developer 50 | true 51 | Entitlements.plist 52 | 53 | 54 | none 55 | true 56 | bin\iPhone\Release 57 | prompt 58 | 4 59 | ARM64 60 | iPhone Developer 61 | Entitlements.plist 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | false 75 | 76 | 77 | false 78 | 79 | 80 | false 81 | 82 | 83 | false 84 | 85 | 86 | false 87 | 88 | 89 | false 90 | 91 | 92 | false 93 | 94 | 95 | false 96 | 97 | 98 | false 99 | 100 | 101 | false 102 | 103 | 104 | false 105 | 106 | 107 | false 108 | 109 | 110 | false 111 | 112 | 113 | false 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | {3850CB98-5F7D-4A57-946E-A244B6686397} 136 | SimpleXamarinGraphQL 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleXamarinGraphQL.Android", "SimpleXamarinGraphQL.Android\SimpleXamarinGraphQL.Android.csproj", "{C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleXamarinGraphQL.iOS", "SimpleXamarinGraphQL.iOS\SimpleXamarinGraphQL.iOS.csproj", "{EDD484E0-3CFF-4142-875E-B5A2EF03B41D}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleXamarinGraphQL", "SimpleXamarinGraphQL\SimpleXamarinGraphQL.csproj", "{3850CB98-5F7D-4A57-946E-A244B6686397}" 9 | EndProject 10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E48CFC35-17D6-4B52-8D85-E8C5167259D0}" 11 | ProjectSection(SolutionItems) = preProject 12 | Directory.Build.props = Directory.Build.props 13 | EndProjectSection 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|Any CPU = Debug|Any CPU 18 | Release|Any CPU = Release|Any CPU 19 | Debug|iPhoneSimulator = Debug|iPhoneSimulator 20 | Release|iPhoneSimulator = Release|iPhoneSimulator 21 | Debug|iPhone = Debug|iPhone 22 | Release|iPhone = Release|iPhone 23 | EndGlobalSection 24 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 25 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}.Release|Any CPU.Build.0 = Release|Any CPU 29 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 30 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 31 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 32 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 33 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}.Debug|iPhone.ActiveCfg = Debug|Any CPU 34 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}.Debug|iPhone.Build.0 = Debug|Any CPU 35 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}.Release|iPhone.ActiveCfg = Release|Any CPU 36 | {C7ADC9AC-A3D8-4694-A663-E8B41F1F320F}.Release|iPhone.Build.0 = Release|Any CPU 37 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator 38 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator 39 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator 40 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D}.Release|Any CPU.Build.0 = Release|iPhoneSimulator 41 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator 42 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator 43 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator 44 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator 45 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D}.Debug|iPhone.ActiveCfg = Debug|iPhone 46 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D}.Debug|iPhone.Build.0 = Debug|iPhone 47 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D}.Release|iPhone.ActiveCfg = Release|iPhone 48 | {EDD484E0-3CFF-4142-875E-B5A2EF03B41D}.Release|iPhone.Build.0 = Release|iPhone 49 | {3850CB98-5F7D-4A57-946E-A244B6686397}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 50 | {3850CB98-5F7D-4A57-946E-A244B6686397}.Debug|Any CPU.Build.0 = Debug|Any CPU 51 | {3850CB98-5F7D-4A57-946E-A244B6686397}.Release|Any CPU.ActiveCfg = Release|Any CPU 52 | {3850CB98-5F7D-4A57-946E-A244B6686397}.Release|Any CPU.Build.0 = Release|Any CPU 53 | {3850CB98-5F7D-4A57-946E-A244B6686397}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 54 | {3850CB98-5F7D-4A57-946E-A244B6686397}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 55 | {3850CB98-5F7D-4A57-946E-A244B6686397}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 56 | {3850CB98-5F7D-4A57-946E-A244B6686397}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 57 | {3850CB98-5F7D-4A57-946E-A244B6686397}.Debug|iPhone.ActiveCfg = Debug|Any CPU 58 | {3850CB98-5F7D-4A57-946E-A244B6686397}.Debug|iPhone.Build.0 = Debug|Any CPU 59 | {3850CB98-5F7D-4A57-946E-A244B6686397}.Release|iPhone.ActiveCfg = Release|Any CPU 60 | {3850CB98-5F7D-4A57-946E-A244B6686397}.Release|iPhone.Build.0 = Release|Any CPU 61 | EndGlobalSection 62 | EndGlobal 63 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL/App.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms.PlatformConfiguration; 2 | using Xamarin.Forms.PlatformConfiguration.iOSSpecific; 3 | 4 | namespace SimpleXamarinGraphQL 5 | { 6 | public class App : Xamarin.Forms.Application 7 | { 8 | public App() 9 | { 10 | var navigationPage = new Xamarin.Forms.NavigationPage(new GraphQLPage()) 11 | { 12 | BarBackgroundColor = Xamarin.Forms.Color.FromHex("#3498db"), 13 | BarTextColor = Xamarin.Forms.Color.White 14 | }; 15 | navigationPage.On().SetPrefersLargeTitles(true); 16 | 17 | MainPage = navigationPage; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL/Constants/GitHubConstants.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleXamarinGraphQL 2 | { 3 | public static class GitHubConstants 4 | { 5 | #error Missing Token, Follow these steps to create your Personal Access Token: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token 6 | public const string PersonalAccessToken = ""; 7 | 8 | public const string GraphQLApiUrl = "https://api.github.com/graphql"; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL/Models/Followers.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace SimpleXamarinGraphQL 4 | { 5 | public class Followers 6 | { 7 | public Followers(long totalCount) => TotalCount = totalCount; 8 | 9 | public long TotalCount { get; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL/Models/GitHubUser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | 4 | namespace SimpleXamarinGraphQL 5 | { 6 | public class GitHubUser 7 | { 8 | public GitHubUser(string name, string company, DateTimeOffset createdAt, Followers followers) => 9 | (Name, Company, CreatedAt, FollowersCount) = (name, company, createdAt, followers.TotalCount); 10 | 11 | public string Name { get; } 12 | 13 | public string Company { get; } 14 | 15 | public DateTimeOffset CreatedAt { get; } 16 | 17 | public long FollowersCount { get; } 18 | 19 | public override string ToString() 20 | { 21 | var stringBuilder = new StringBuilder(); 22 | 23 | stringBuilder.AppendLine($"{nameof(Name)}: {Name}"); 24 | stringBuilder.AppendLine($"{nameof(Company)}: {Company}"); 25 | stringBuilder.AppendLine($"{nameof(CreatedAt)}: {CreatedAt:d}"); 26 | stringBuilder.Append($"{nameof(FollowersCount)}: {FollowersCount}"); 27 | 28 | return stringBuilder.ToString(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL/Models/GitHubUserGraphQLResponse.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleXamarinGraphQL 2 | { 3 | public class GitHubUserGraphQLResponse 4 | { 5 | public GitHubUserGraphQLResponse(GitHubUser user) => User = user; 6 | 7 | public GitHubUser User { get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL/Pages/BaseContentPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using Xamarin.Forms.PlatformConfiguration; 3 | using Xamarin.Forms.PlatformConfiguration.iOSSpecific; 4 | 5 | namespace SimpleXamarinGraphQL 6 | { 7 | abstract class BaseContentPage : ContentPage where T : BaseViewModel, new() 8 | { 9 | protected BaseContentPage(string title) 10 | { 11 | BindingContext = ViewModel; 12 | BackgroundColor = Color.FromHex("#2980b9"); 13 | Title = title; 14 | 15 | On().SetUseSafeArea(true); 16 | } 17 | 18 | protected T ViewModel { get; } = new T(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL/Pages/GraphQLPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using Xamarin.CommunityToolkit.Markup; 3 | using static Xamarin.CommunityToolkit.Markup.GridRowsColumns; 4 | 5 | namespace SimpleXamarinGraphQL 6 | { 7 | class GraphQLPage : BaseContentPage 8 | { 9 | public GraphQLPage() : base("GitHub User") 10 | { 11 | Content = new Grid 12 | { 13 | Margin = new Thickness(20, 20, 20, 40), 14 | 15 | HorizontalOptions = LayoutOptions.FillAndExpand, 16 | VerticalOptions = LayoutOptions.FillAndExpand, 17 | 18 | RowSpacing = 20, 19 | 20 | RowDefinitions = Rows.Define( 21 | (Row.LoginEntry, new GridLength(50, GridUnitType.Absolute)), 22 | (Row.DownloadButton, new GridLength(50, GridUnitType.Absolute)), 23 | (Row.ActivityIndicator, new GridLength(15, GridUnitType.Absolute)), 24 | (Row.ResultsLabel, new GridLength(1, GridUnitType.Star))), 25 | 26 | Children = 27 | { 28 | new LoginEntry().Row(Row.LoginEntry) 29 | .Bind(Entry.TextProperty, nameof(GraphQLViewModel.LoginEntryText)) 30 | .Bind(Entry.ReturnCommandProperty, nameof(GraphQLViewModel.DownloadButtonCommand)), 31 | 32 | new DownloadButton().Row(Row.DownloadButton) 33 | .Bind(Button.CommandProperty, nameof(GraphQLViewModel.DownloadButtonCommand)), 34 | 35 | new ActivityIndicator { Color = Color.White }.Row(Row.ActivityIndicator) 36 | .Bind(IsVisibleProperty, nameof(GraphQLViewModel.IsExecuting)) 37 | .Bind(ActivityIndicator.IsRunningProperty, nameof(GraphQLViewModel.IsExecuting)), 38 | 39 | new ResultsLabel().Row(Row.ResultsLabel) 40 | .Bind(Label.TextProperty, nameof(GraphQLViewModel.ResultsLabelText)) 41 | } 42 | }; 43 | } 44 | 45 | enum Row { LoginEntry, DownloadButton, ActivityIndicator, ResultsLabel } 46 | 47 | class LoginEntry : Entry 48 | { 49 | public LoginEntry() 50 | { 51 | Placeholder = "GitHub Username"; 52 | BackgroundColor = Device.RuntimePlatform is Device.iOS ? Color.White : default; 53 | ClearButtonVisibility = ClearButtonVisibility.WhileEditing; 54 | HorizontalOptions = LayoutOptions.FillAndExpand; 55 | HorizontalTextAlignment = TextAlignment.Start; 56 | ReturnType = ReturnType.Go; 57 | PlaceholderColor = Color.LightGray; 58 | TextColor = Device.RuntimePlatform is Device.Android ? Color.White : Color.Black; 59 | } 60 | } 61 | 62 | class DownloadButton : Button 63 | { 64 | public DownloadButton() 65 | { 66 | HorizontalOptions = LayoutOptions.FillAndExpand; 67 | BackgroundColor = Color.Transparent; 68 | TextColor = Color.White; 69 | BorderColor = Color.White; 70 | FontSize = 18; 71 | CornerRadius = 3; 72 | BorderWidth = 1; 73 | Text = "Get User Info"; 74 | } 75 | } 76 | 77 | class ResultsLabel : Label 78 | { 79 | public ResultsLabel() 80 | { 81 | FontSize = 20; 82 | VerticalOptions = LayoutOptions.CenterAndExpand; 83 | HorizontalOptions = LayoutOptions.FillAndExpand; 84 | HorizontalTextAlignment = TextAlignment.Start; 85 | VerticalTextAlignment = TextAlignment.Start; 86 | TextColor = Color.White; 87 | } 88 | } 89 | } 90 | } -------------------------------------------------------------------------------- /SimpleXamarinGraphQL/Services/GitHubGraphQLService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Net.Http.Headers; 4 | using System.Threading.Tasks; 5 | using GraphQL; 6 | using GraphQL.Client.Http; 7 | using GraphQL.Client.Serializer.Newtonsoft; 8 | using ModernHttpClient; 9 | using Polly; 10 | 11 | namespace SimpleXamarinGraphQL 12 | { 13 | public static class GitHubGraphQLService 14 | { 15 | static readonly Lazy _client = new(CreateGitHubGraphQLClient); 16 | 17 | static GraphQLHttpClient Client => _client.Value; 18 | 19 | public static async Task GetGitHubUser(string login) 20 | { 21 | var graphQLRequest = new GraphQLRequest 22 | { 23 | Query = "query { user(login: \"" + login + "\"){ name, company, createdAt, followers{ totalCount }}}" 24 | }; 25 | 26 | var gitHubUserResponse = await AttemptAndRetry(() => Client.SendQueryAsync(graphQLRequest)).ConfigureAwait(false); 27 | 28 | return gitHubUserResponse.User; 29 | } 30 | 31 | static GraphQLHttpClient CreateGitHubGraphQLClient() 32 | { 33 | var graphQLOptions = new GraphQLHttpClientOptions 34 | { 35 | EndPoint = new Uri(GitHubConstants.GraphQLApiUrl), 36 | HttpMessageHandler = new NativeMessageHandler(), 37 | }; 38 | 39 | var client = new GraphQLHttpClient(graphQLOptions, new NewtonsoftJsonSerializer()); 40 | client.HttpClient.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue(new ProductHeaderValue(nameof(SimpleXamarinGraphQL)))); 41 | client.HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("bearer", GitHubConstants.PersonalAccessToken); 42 | 43 | return client; 44 | } 45 | 46 | static async Task AttemptAndRetry(Func>> action, int numRetries = 2) 47 | { 48 | var response = await Policy.Handle().WaitAndRetryAsync(numRetries, pollyRetryAttempt).ExecuteAsync(action).ConfigureAwait(false); 49 | 50 | if (response.Errors != null && response.Errors.Count() > 1) 51 | throw new AggregateException(response.Errors.Select(x => new Exception(x.Message))); 52 | else if (response.Errors != null && response.Errors.Any()) 53 | throw new Exception(response.Errors.First().Message.ToString()); 54 | 55 | return response.Data; 56 | 57 | static TimeSpan pollyRetryAttempt(int attemptNumber) => TimeSpan.FromSeconds(Math.Pow(2, attemptNumber)); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL/SimpleXamarinGraphQL.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | true 6 | 7 | 8 | pdbonly 9 | true 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SimpleXamarinGraphQL/ViewModels/BaseViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | using System.Runtime.CompilerServices; 4 | using AsyncAwaitBestPractices; 5 | 6 | namespace SimpleXamarinGraphQL 7 | { 8 | abstract class BaseViewModel : INotifyPropertyChanged 9 | { 10 | readonly WeakEventManager _propertyChangedEventManager = new WeakEventManager(); 11 | 12 | event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged 13 | { 14 | add => _propertyChangedEventManager.AddEventHandler(value); 15 | remove => _propertyChangedEventManager.RemoveEventHandler(value); 16 | } 17 | 18 | protected void SetProperty(ref T backingStore, in T value, in System.Action? onChanged = null, [CallerMemberName] in string propertyname = "") 19 | { 20 | if (EqualityComparer.Default.Equals(backingStore, value)) 21 | return; 22 | 23 | backingStore = value; 24 | 25 | onChanged?.Invoke(); 26 | 27 | OnPropertyChanged(propertyname); 28 | } 29 | 30 | void OnPropertyChanged([CallerMemberName] in string propertyName = "") => 31 | _propertyChangedEventManager.RaiseEvent(this, new PropertyChangedEventArgs(propertyName), nameof(INotifyPropertyChanged.PropertyChanged)); 32 | } 33 | } -------------------------------------------------------------------------------- /SimpleXamarinGraphQL/ViewModels/GraphQLViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using AsyncAwaitBestPractices.MVVM; 3 | using Xamarin.Forms; 4 | 5 | namespace SimpleXamarinGraphQL 6 | { 7 | class GraphQLViewModel : BaseViewModel 8 | { 9 | bool _isExecuting; 10 | string _resultsLabelText = string.Empty, 11 | _loginEntryText = "brminnick"; 12 | 13 | public GraphQLViewModel() 14 | { 15 | DownloadButtonCommand = new AsyncCommand(() => ExecuteDownloadButtonTapped(LoginEntryText), _ => !IsExecuting); 16 | } 17 | 18 | public IAsyncCommand DownloadButtonCommand { get; } 19 | 20 | public bool IsExecuting 21 | { 22 | get => _isExecuting; 23 | set => SetProperty(ref _isExecuting, value, () => Xamarin.Essentials.MainThread.BeginInvokeOnMainThread(DownloadButtonCommand.RaiseCanExecuteChanged)); 24 | } 25 | 26 | public string LoginEntryText 27 | { 28 | get => _loginEntryText; 29 | set => SetProperty(ref _loginEntryText, value); 30 | } 31 | 32 | public string ResultsLabelText 33 | { 34 | get => _resultsLabelText; 35 | set => SetProperty(ref _resultsLabelText, value); 36 | } 37 | 38 | async Task ExecuteDownloadButtonTapped(string login) 39 | { 40 | IsExecuting = true; 41 | 42 | ResultsLabelText = "Getting GitHub User Data..."; 43 | 44 | try 45 | { 46 | var gitHubUser = await GitHubGraphQLService.GetGitHubUser(login).ConfigureAwait(false); 47 | 48 | ResultsLabelText = gitHubUser.ToString(); 49 | } 50 | catch (System.Exception e) 51 | { 52 | ResultsLabelText = e.Message; 53 | } 54 | finally 55 | { 56 | IsExecuting = false; 57 | } 58 | } 59 | } 60 | } 61 | --------------------------------------------------------------------------------