├── .github
├── FUNDING.yml
├── dependabot.yml
└── workflows
│ └── main.yml
├── .gitignore
├── LICENSE
├── README.md
└── Source
├── Directory.Build.props
├── DotNetGraphQL.API
├── Data
│ └── DogImagesData.cs
├── DotNetGraphQL.API.csproj
├── GraphTypes
│ ├── DogImagesGraphType.cs
│ └── ImagesGraphType.cs
├── Program.cs
├── Public
│ ├── bundle.js
│ ├── index.html
│ └── style.css
├── Schemas
│ ├── GraphQLSchema.cs
│ └── ImagesQuery.cs
├── Startup.cs
├── appsettings.Development.json
└── appsettings.json
├── DotNetGraphQL.Common
├── DotNetGraphQL.Common.csproj
└── Models
│ ├── DogImagesGraphQLResponse.cs
│ ├── DogImagesModel.cs
│ └── ImagesModel.cs
├── DotNetGraphQL.Mobile.Android
├── Assets
│ └── AboutAssets.txt
├── CustomRenderers
│ └── LabelCustomRenderer.cs
├── DotNetGraphQL.Mobile.Android.csproj
├── MainActivity.cs
├── Properties
│ ├── AndroidManifest.xml
│ └── AssemblyInfo.cs
├── Resources
│ ├── AboutResources.txt
│ ├── Resource.designer.cs
│ ├── drawable
│ │ └── actionbar_shadow.xml
│ ├── 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
├── linker.xml
└── proguard.cfg
├── DotNetGraphQL.Mobile.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
├── DotNetGraphQL.Mobile.iOS.csproj
├── 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
├── DotNetGraphQL.Mobile
├── App.cs
├── Constants
│ └── BackendConstants.cs
├── DotNetGraphQL.Mobile.csproj
├── Pages
│ ├── Base
│ │ ├── BaseContentPage.cs
│ │ └── BaseNavigationPage.cs
│ └── ImageListPage.cs
├── Services
│ └── GraphQLService.cs
├── ViewModels
│ ├── BaseViewModel.cs
│ └── ImageListViewModel.cs
└── Views
│ └── ImageList
│ └── DogImageListDataTemplateSelector.cs
├── DotNetGraphQL.sln
└── global.json
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [brminnick]
4 |
--------------------------------------------------------------------------------
/.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: "/Source"
10 | schedule:
11 | interval: "daily"
12 |
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: Solution
2 |
3 | on:
4 | push:
5 | branches:
6 | - "main"
7 | pull_request:
8 | branches:
9 | - "*"
10 |
11 | jobs:
12 |
13 | Build:
14 | runs-on: macos-latest
15 |
16 | steps:
17 | - uses: actions/checkout@v1
18 |
19 | - name: Setup .NET v6.0
20 | uses: actions/setup-dotnet@v1
21 | with:
22 | dotnet-version: '6.0.x'
23 | include-prerelease: true
24 |
25 | - name: Setup .NET Core v3.1
26 | uses: actions/setup-dotnet@v1
27 | with:
28 | dotnet-version: '3.1.x'
29 |
30 | - name: Restore NuGet
31 | run: dotnet restore ./Source
32 |
33 | - name: Build Android
34 | run: msbuild ./Source/DotNetGraphQL.Mobile.Android /restore
35 |
36 | - name: Build API
37 | run: dotnet build ./Source/DotNetGraphQL.API -c Release
38 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/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 | [](https://github.com/brminnick/DotNetGraphQL/actions/workflows/main.yml)
2 |
3 | # GraphQL in .NET
4 |
5 | If you're new to GraphQL, check out these videos featured in the [Learn More](#learn-more) section, below
6 | - [Learning GraphQL Series](#learning-graphql-series)
7 | - [Xamarin + GraphQL](#xamarin--graphql)
8 | - On .NET Show, Channel 9
9 | - [Introduction to GraphQL](https://docs.microsoft.com/shows/on-net/introduction-to-graphql?WT.mc_id=dotnetgraphql-codetraveler-bramin)
10 | - [Creating a GraphQL Backend in C#](https://docs.microsoft.com/shows/on-net/creating-a-graphql-backend?WT.mc_id=dotnetgraphql-codetraveler-bramin)
11 | - [Consuming GraphQL in C#](https://docs.microsoft.com/shows/on-net/consuming-graphql-in-c?WT.mc_id=dotnetgraphql-codetraveler-bramin)
12 |
13 | To run this sample, follow the [Getting Started Instructions, below](#getting-started).
14 |
15 | This app was featured at [GraphQL Summit 2019](https://codetraveler.io/GraphQLSummit-DotNet).
16 |
17 | ## Video Recordings
18 |
19 | ### Consuming GraphQL in C#
20 |
21 | This session on GraphQL + C# was delivered at [GraphQL Summit 2019](https://codetraveler.io/GraphQLSummit-DotNet). It demonstrates how to create a GraphQL Backend in C# and connect it to a client-side mobile app written in C# using Xamarin.
22 |
23 | [](https://youtu.be/t1cQsenAmNo?t=18575)
24 |
25 | ### Xamarin + GraphQL
26 |
27 | The session on Xamarin + GraphQL was delivered at [Xamarin Developer Summit 2019](https://www.codetraveler.io/xamdevsummit-graphql/). It demonstrates how to create a Xamarin app in C# and connect it to an existing GraphQL Backend.
28 |
29 | [](https://channel9.msdn.com/Events/Xamarin/Xamarin-Developer-Summit-2019/XamarinGraphQL?WT.mc_id=mobile-0000-bramin)
30 |
31 | ### Learning GraphQL Series
32 |
33 | This special series teaches the basics of GraphQL, how to interact with an existing GraphQL endpoint, how to create your first GraphQL Server, and how to deploy your GraphQL Server to the cloud using Azure!
34 |
35 | [](https://learn.microsoft.com/shows/graphql?WT.mc_id=mobile-0000-bramin)
36 |
37 | ### On .NET Show
38 |
39 | In this series, we cover how to create an end-to-end soolution, creating GraphQL Backend in C# and connecting to it from a C# client.
40 |
41 | - [Introduction to GraphQL](https://docs.microsoft.com/shows/on-net/introduction-to-graphql?WT.mc_id=dotnetgraphql-codetraveler-bramin)
42 | - [Creating a GraphQL Backend in C#](https://docs.microsoft.com/shows/on-net/creating-a-graphql-backend?WT.mc_id=dotnetgraphql-codetraveler-bramin)
43 | - [Consuming GraphQL in C#](https://docs.microsoft.com/shows/on-net/consuming-graphql-in-c?WT.mc_id=dotnetgraphql-codetraveler-bramin)
44 |
45 | [](https://docs.microsoft.com/shows/on-net/?WT.mc_id=mobile-0000-bramin)
46 |
47 | ## App Architecture
48 |
49 | ### GraphQL Backend
50 | The GraphQL backend is created in C# using the [GraphQL NuGet Package](https://www.nuget.org/packages/GraphQL/).
51 |
52 | | GraphiQL |
53 | | -------- |
54 | |  |
55 |
56 | ### Mobile
57 | The mobile app is created in C# using [Xamarin](https://docs.microsoft.com/xamarin/cross-platform/?WT.mc_id=mobile-0000-bramin) and the [GraphQL.Client NuGet Package](https://www.nuget.org/packages/GraphQL.Client/).
58 |
59 | | Xamarin.iOS | Xamarin.Android |
60 | | ----------- | --------------- |
61 | |
|
|
62 |
63 | ## Getting Started
64 |
65 | This app requires us to run the GraphQL API using the terminal while using Visual Studio to build/deploy the Xamarin.iOS and/or Xamarin.Android app.
66 |
67 | ### 1. Run the GraphQL API
68 |
69 | 1. Open the **terminal**
70 | 2. In the **terminal**, clone this solution by entering the following command:
71 | - **Note:** If you have already downloaded the solution, skip this step
72 |
73 | ```bash
74 | git clone https://github.com/brminnick/dotnetgraphql.git
75 | ```
76 |
77 | 3. In the **terminal**, navigate to the `DotNetGraphQL.API` folder by entering the following command:
78 |
79 | - On Windows
80 |
81 | ```bash
82 | cd [path to DotNetGraphQL folder]\Source\DotNetGraphQL.API\
83 | ```
84 | - On macOS
85 | ```bash
86 | cd [path to DotNetGraphQL folder]/Source/DotNetGraphQL.API/
87 | ```
88 |
89 | 4. In the **terminal**, run `DotNetGraphQL.API.csproj` by entering the following command:
90 |
91 | ```bash
92 | dotnet run
93 | ```
94 |
95 | 5. Open a web browser
96 | 6. In the web browser, navgiate to `http://localhost:4000`
97 | 7. Confirm GraphiQL
98 |
99 | ### 2. Run the Xamarin.Android App
100 |
101 | 1. In **Visual Studio**, open `DotNetGraphQL/Source/DotNetGraphQL.sln`
102 | 2. In **Visual Studio**, in the **Solution Explorer**, right-click on **DotNetGraphQL.Android**
103 | 3. In the right-click menu, select **Set as Startup Project**
104 | 4. In **Visual Studio**, build/deploy **DotNetGraphQL.Android** to an Android device
105 | 6. Confirm the list of dogs from the GraphQL API appears
106 |
107 | # Learn More
108 |
109 | Learn more about Xamarin + GraphQL
110 |
111 | ## Docs
112 |
113 | ### Xamarin Resources
114 |
115 | - [Getting Started with Xamarin](https://docs.microsoft.com/xamarin/cross-platform/?WT.mc_id=mobile-0000-bramin)
116 | - [Getting Started with Xamarin.Forms](https://docs.microsoft.com/xamarin/xamarin-forms?WT.mc_id=mobile-0000-bramin)
117 | - [Install Visual Studio (PC) + Xamarin](https://docs.microsoft.com/xamarin/get-started/installation/windows?WT.mc_id=mobile-0000-bramin)
118 | - [Install Visual Studio for Mac + Xamarin](https://docs.microsoft.com/visualstudio/mac/installation?view=vsmac-2019&WT.mc_id=mobile-0000-bramin)
119 | - [Microsoft Learn: Build Mobile Apps With Xamarin.Forms](https://docs.microsoft.com/learn/paths/build-mobile-apps-with-xamarin-forms?WT.mc_id=mobile-0000-bramin)
120 | - Xamarin Source Code
121 | - [Xamarin.iOS](https://github.com/xamarin/xamarin-macios)
122 | - [Xamarin.Android](https://github.com/xamarin/xamarin-android)
123 | - [Xamarin.Forms](https://github.com/xamarin/Xamarin.Forms)
124 | - [Mono](https://github.com/mono/mono)
125 |
126 | ### GraphQL Resources
127 |
128 | - [GraphQL.org](https://graphql.org/)
129 | - [Using Postman with GraphQL API](https://www.codetraveler.io/2019/01/12/how-to-use-postman-with-a-graphql-api/)
130 | - [GraphQL for .NET](https://github.com/graphql-dotnet/graphql-dotnet)
131 | - [GraphQL vs REST](https://philsturgeon.uk/api/2017/01/24/graphql-vs-rest-overview/)
132 | - [GraphQL vs OData](https://jeffhandley.com/2018-09-13/graphql-is-not-odata)
133 | - [Awesome GraphQL](https://github.com/chentsulin/awesome-graphql)
134 |
--------------------------------------------------------------------------------
/Source/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | latest
5 | enable
6 | nullable
7 | True
8 | false
9 |
10 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.API/Data/DogImagesData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using DotNetGraphQL.Common;
4 |
5 | namespace DotNetGraphQL.API
6 | {
7 | public static class DogImagesData
8 | {
9 | readonly static Lazy> _dogImagesHolder = new Lazy>(CreateDogImageList);
10 |
11 | public static IEnumerable DogImages => _dogImagesHolder.Value;
12 |
13 | static IEnumerable CreateDogImageList()
14 | {
15 | yield return GenerateKirbyModel();
16 | yield return GenerateWafflesModel();
17 | yield return GenerateWhiskeyModel();
18 | yield return GenerateTobyModel();
19 | yield return GenerateMozzieModel();
20 | yield return GenerateMiloModel();
21 | yield return GeneratePiperModel();
22 | yield return GenerateMagicModel();
23 | yield return GenerateHermesModel();
24 | }
25 |
26 | static DogImagesModel GenerateKirbyModel()
27 | {
28 | var avatarUrl = "https://user-images.githubusercontent.com/13558917/88319324-d78fa280-ccd0-11ea-94c7-9c63bb13346a.jpg";
29 | var websiteUrl = "https://www.instagram.com/kirbygoldendoodle/";
30 | var name = "Kirby";
31 |
32 | var photosList = new List
33 | {
34 | "https://scontent-sjc3-1.cdninstagram.com/vp/c191bde43f30d153a0e6f14d268899d7/5E3E5E59/t51.2885-15/e35/16906877_256386878145018_3660463037103472640_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=106",
35 | "https://scontent-sjc3-1.cdninstagram.com/vp/c41a8852ad9f767142023c3aee0b2bc2/5E64935C/t51.2885-15/e35/15258568_1837703606502348_6968759831339466752_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=100",
36 | "https://scontent-sjc3-1.cdninstagram.com/vp/bdbdd86ae01663b0f2682e5188235bd5/5E5BE931/t51.2885-15/e35/40022236_2195986720641841_3833817043975536640_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=101",
37 | "https://scontent-sjc3-1.cdninstagram.com/vp/3f4fc8c9a519398ed564dd4b39075a2a/5E546C7D/t51.2885-15/e35/13743278_1069261413162264_576463155_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=100",
38 | "https://scontent-sjc3-1.cdninstagram.com/vp/78c245bfd5afc9f0d9a21d5ed86acc91/5E5C5E95/t51.2885-15/e35/13706978_577881049040730_1166627530_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=106"
39 | };
40 |
41 | var breed = "Goldendoodle";
42 | var coatColor = "Brown";
43 | var birthDate = new DateTime(2014, 03, 26);
44 |
45 | return new DogImagesModel(avatarUrl, websiteUrl, name, photosList, breed, coatColor, birthDate);
46 | }
47 |
48 | static DogImagesModel GenerateWafflesModel()
49 | {
50 | var avatarUrl = "https://user-images.githubusercontent.com/13558917/88319372-e70eeb80-ccd0-11ea-967d-61c4504870e6.jpg";
51 | var websiteUrl = "https://www.instagram.com/hisnameiswaffles/";
52 | var name = "Waffles";
53 |
54 | var photosList = new List
55 | {
56 | "https://scontent-sjc3-1.cdninstagram.com/vp/62735ce73ed50f10b083e63ee67777fd/5E469C5B/t51.2885-15/e35/s1080x1080/70594613_472808650109566_9086049796094395007_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=110",
57 | "https://scontent-sjc3-1.cdninstagram.com/vp/463d2f790dad456aa7f907fbc5c4f2d5/5E5E4DA2/t51.2885-15/e35/p1080x1080/68904319_153662302373174_5867607915252717949_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=102",
58 | "https://scontent-sjc3-1.cdninstagram.com/vp/6f094e68dcea3ce76025bc9a3aae1d10/5E4B5760/t51.2885-15/e35/p1080x1080/61615381_142948983481771_3906781618639463667_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=107",
59 | "https://scontent-sjc3-1.cdninstagram.com/vp/df20cab484e3fdce8e7b93be068cd955/5E5F68F4/t51.2885-15/e35/p1080x1080/60983676_671182750019423_8627416967785409822_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=111",
60 | "https://scontent-sjc3-1.cdninstagram.com/vp/4a5977fc6da543a3580dc65bec020f72/5E420BE3/t51.2885-15/e35/p1080x1080/60306434_315395119395230_9143171722741474046_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=102"
61 | };
62 |
63 | var breed = "Australian Labradoodle";
64 | var coatColor = "Brown";
65 | var birthDate = new DateTime(2016, 9, 25);
66 |
67 | return new DogImagesModel(avatarUrl, websiteUrl, name, photosList, breed, coatColor, birthDate);
68 | }
69 |
70 | static DogImagesModel GenerateWhiskeyModel()
71 | {
72 | var avatarUrl = "https://images.squarespace-cdn.com/content/v1/57cca06f3e00bed93badcd9c/1566682240113-70ECATYDEEH5FBW1NTPW/ke17ZwdGBToddI8pDm48kIBEKF6uBDDDpZ6S-0pxI0Z7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z5QPOohDIaIeljMHgDF5CVlOqpeNLcJ80NK65_fV7S1Uc18tlTqrULqHQaddUm6wPTBY5imP5K7_W35X5uaSDoHZCkVnhDMoqWnIzF2cFonXg/IMG_0123.JPG?format=2500w";
73 | var websiteUrl = "https://www.whiskeythegoldendoodle.com/";
74 | var name = "Whiskey";
75 |
76 | var photosList = new List
77 | {
78 | "https://scontent-sjc3-1.cdninstagram.com/vp/4211f0fdf9b914a86b17f4cc77b06f38/5E407FAB/t51.2885-15/e35/p1080x1080/73455973_135066861231297_3894223610871841316_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=109",
79 | "https://scontent-sjc3-1.cdninstagram.com/vp/005559b904601259ce1277f655c90d04/5E520550/t51.2885-15/e35/s1080x1080/71699399_105498964122420_3067354989714568803_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=100",
80 | "https://scontent-sjc3-1.cdninstagram.com/vp/20e3b70a89332e8828f174a4e667118b/5E64AB82/t51.2885-15/e35/s1080x1080/73470571_1174481369427819_896524531300036982_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=103",
81 | "https://scontent-sjc3-1.cdninstagram.com/vp/dcf154912d88601ce4634ad2aaacc9d2/5E5C5529/t51.2885-15/e35/s1080x1080/73385907_416773049249260_5284448024311527390_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=104",
82 | "https://scontent-sjc3-1.cdninstagram.com/vp/ea9209ece298646348c41c6842a07838/5E4D5E4A/t51.2885-15/e35/s1080x1080/71520955_426072908105789_4729723680327501608_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=105"
83 | };
84 |
85 | var breed = "Goldendoodle";
86 | var coatColor = "Brown";
87 | var birthDate = new DateTime(2014, 9, 27);
88 |
89 | return new DogImagesModel(avatarUrl, websiteUrl, name, photosList, breed, coatColor, birthDate);
90 | }
91 |
92 | static DogImagesModel GenerateTobyModel()
93 | {
94 | var avatarUrl = "https://user-images.githubusercontent.com/13558917/88319462-0f96e580-ccd1-11ea-8b75-99b1c96fc826.jpg";
95 | var websiteUrl = "https://www.instagram.com/tobytheyorki/";
96 | var name = "Toby";
97 |
98 | var photosList = new List
99 | {
100 | "https://scontent-sjc3-1.cdninstagram.com/vp/026b0cdcd5316f7724c46a661d5fcfe3/5E4D8090/t51.2885-15/e35/s1080x1080/73512708_217192415937172_3862082126193392957_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=104",
101 | "https://scontent-sjc3-1.cdninstagram.com/vp/846fc56318141ed874e32703783526ef/5E55226D/t51.2885-15/e35/46638136_1004411036396080_6556008126338603743_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=104",
102 | "https://scontent-sjc3-1.cdninstagram.com/vp/ddb14f03ec8d761a230129ff0f2105a1/5E40541E/t51.2885-15/e35/44670242_379346979477654_7945422659005600483_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=106",
103 | "https://scontent-sjc3-1.cdninstagram.com/vp/198181b447c366631b05345deeed1a42/5E54BE2A/t51.2885-15/e35/41757764_1706672939443534_7883211221366895205_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=110",
104 | "https://scontent-sjc3-1.cdninstagram.com/vp/eba203221dfc2192c5ab1fad00390d04/5E4E9A23/t51.2885-15/e35/41361237_466468830510817_2675091403118276335_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=101"
105 | };
106 |
107 | var breed = "Yorki";
108 | var coatColor = "Brown";
109 | var birthDate = new DateTime(2015, 2, 11);
110 |
111 | return new DogImagesModel(avatarUrl, websiteUrl, name, photosList, breed, coatColor, birthDate);
112 | }
113 |
114 | static DogImagesModel GenerateMozzieModel()
115 | {
116 | var avatarUrl = "https://user-images.githubusercontent.com/13558917/88319558-2d644a80-ccd1-11ea-87c8-017e439a10c4.jpg";
117 | var websiteUrl = "https://www.instagram.com/mozziethepuppy/";
118 | var name = "Mozzie";
119 |
120 | var photosList = new List
121 | {
122 | "https://scontent-sjc3-1.cdninstagram.com/vp/fc3b9167bdf9b9bb2596a56c9fbd6bbc/5E4C8D4C/t51.2885-15/e35/44788461_585502225220134_1741283381522447371_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=110",
123 | "https://scontent-sjc3-1.cdninstagram.com/vp/fe77df3e656cc2cc47e705bcc9b62491/5E5F8648/t51.2885-15/e35/20759134_1905007816418883_8680830969160138752_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=103",
124 | "https://scontent-sjc3-1.cdninstagram.com/vp/600852e58f21929c227b42a444b90e0d/5E58ACB1/t51.2885-15/e35/19425309_280400619034639_7395849394978816000_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=107",
125 | "https://scontent-sjc3-1.cdninstagram.com/vp/d5c3553c84fdd9a0dd066215292f789c/5E5C9C1E/t51.2885-15/e35/19379883_1916079598630295_6981673084306587648_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=111",
126 | "https://scontent-sjc3-1.cdninstagram.com/vp/5fa735a9f014218d43ff18ce5934e017/5E40E7EF/t51.2885-15/e35/17663597_1751930025118061_7905305431944200192_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=105"
127 | };
128 |
129 | var breed = "Mix";
130 | var coatColor = "Brown";
131 | var birthDate = new DateTime(2016, 10, 28);
132 |
133 | return new DogImagesModel(avatarUrl, websiteUrl, name, photosList, breed, coatColor, birthDate);
134 | }
135 |
136 | static DogImagesModel GeneratePiperModel()
137 | {
138 | var avatarUrl = "https://user-images.githubusercontent.com/13558917/88319709-64d2f700-ccd1-11ea-89f1-acec01d686a3.jpg";
139 | var websiteUrl = "https://www.instagram.com/piper.bt/";
140 | var name = "Piper";
141 |
142 | var photosList = new List
143 | {
144 | "https://scontent-sjc3-1.cdninstagram.com/vp/3f8fe47bb1c7a7c2d736276055cd6c87/5E5B126D/t51.2885-15/e35/57377602_878432729165265_5451422134633129153_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=109",
145 | "https://scontent-sjc3-1.cdninstagram.com/vp/b8b5dbcfcfeb37df1e93521c4fbf165f/5E458BE9/t51.2885-15/e35/14498894_246013109150758_7047888118367649792_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=110",
146 | "https://scontent-sjc3-1.cdninstagram.com/vp/d608136a5adef62f488b614690716cd5/5E490240/t51.2885-15/e35/13696797_754628597974092_928639078_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=100",
147 | "https://scontent-sjc3-1.cdninstagram.com/vp/9a3fe9cb0d2bd8a2268ea24f8f4b7ce0/5E47F579/t51.2885-15/e35/13636072_516768001858171_1831331040_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=107",
148 | "https://scontent-sjc3-1.cdninstagram.com/vp/2d80bcae51410106e3e24b3e42019f57/5E6164C7/t51.2885-15/e35/13671684_574529282754717_589202646_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=109"
149 | };
150 |
151 | var breed = "Bull Dog";
152 | var coatColor = "Black";
153 |
154 | return new DogImagesModel(avatarUrl, websiteUrl, name, photosList, breed, coatColor);
155 | }
156 |
157 | static DogImagesModel GenerateMiloModel()
158 | {
159 | var avatarUrl = "https://user-images.githubusercontent.com/13558917/88319786-803e0200-ccd1-11ea-9b80-a8382ae49bcd.jpg";
160 | var websiteUrl = "https://www.instagram.com/frenchton.milo/";
161 | var name = "Milo";
162 |
163 | var photosList = new List
164 | {
165 | "https://scontent-sjc3-1.cdninstagram.com/vp/8374bbf2c74521ace371c394ac6e70bc/5E4941B7/t51.2885-15/e35/56997710_2131534730276762_1880919774551388605_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=102",
166 | "https://scontent-sjc3-1.cdninstagram.com/vp/876930081aab45c31f4f292c5faf928d/5E5D86F9/t51.2885-15/e35/56749582_282780475992859_5518627445828391985_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=107",
167 | "https://scontent-sjc3-1.cdninstagram.com/vp/11788b4b4328b52e186263cd428a1486/5E4069DB/t51.2885-15/e35/58410888_2241646182762355_3360640618704941668_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=107",
168 | "https://scontent-sjc3-1.cdninstagram.com/vp/4f154f228259d9866a2c3341001bafc7/5E4B8BE6/t51.2885-15/e35/60233054_2323665944620016_5770986023083779017_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=108"
169 | };
170 |
171 | var breed = "Bull Dog";
172 | var coatColor = "Black";
173 |
174 | return new DogImagesModel(avatarUrl, websiteUrl, name, photosList, breed, coatColor);
175 | }
176 |
177 | static DogImagesModel GenerateMagicModel()
178 | {
179 | var avatarUrl = "https://lh3.googleusercontent.com/8B2KQsTtG1nraAD8oE6N2wjNbK-EFEiZMOd3aJkg_Dqf_Wf34MRXjbs8VDIn8w7DTTmz16BbhIQ7hfE-5Xkuruj1lPVgOcZxY3hpGbn483jpnrmW-WfAcC5jg1wsFZ02-Pt5x7tUGCDbl7BfrH0zdaBaxOk3uyOs_zUKHExpSRb125oV7IgBhI9WYuyxSPbZsQVlBCh_NP-yb3B34vZx1IE5D4uHkc960c5V00C_AEllgX5rjMBEyRW9KhDt7gfmvYcssP6VwOH_WtY9gpyNaYihYCubRPtJDX_XnS6mOLMaI3n6i2f8dTo6hJEuCAP-wpybOXCwvBIq0QcmJJUorCH8_Z1-bocfwIZjDNfxVoQ9DC2_N2ZlWAT7eBVRnGSlAXTO4gpFZ9Pj2RYgWqmj1I98_3NWMPKMvlR_-DTAAKX4bkptZ86vsx1Z1e_62l7e7f-3XD9Eg8i_6AZzSOTEOvifOY9mZe8I_VXiYriAOujsIs3sdKeCDNuoLU91cVK9ZdnqJG_ppUkkEGC3V_oMTkE2gXvej6Dvl1vBrVXyoyT9jYjJVUzLZVj4kE9oltojy11ssvUzUs0_RZv_MS1h0Yp645NbyeKdNtDRgyoBPTGhsJj8eMtO_ljjmwqjndwv3M7Wm3Vwl7xfJdSLSmyaAYYauieu3uYbXBPRizLg0jkeWJ8ZvjaKQ2UlD4UqQWAukAtrbcgtsKqPgYCAFU8o6HGXS8bx4JLcZY5BG_8SZhcYlWyP=w989-h742-no";
180 | var websiteUrl = "";
181 | var name = "Magic";
182 |
183 | var photosList = new List
184 | {
185 | "https://lh3.googleusercontent.com/5tmTxxwo95s7a1XOCCoTtxcgyXpi4ZR20Y-GEwiQuAN9ODyCu9pwTcIfvY5_B4hHP7wnKN9RNh4X7quAA8vPIE87lO09Ox8PprvtIpynRwoAfN32mM_KIMqS_N00TB44_68LuNGYHXLJ5MpRyYMzDuAXXCfti719US2mA4RdDU-SvFJKhXhiwJOGK5iBtFbKTuiSrc4fc46NIYQfKn1mR70Z574H1NaZnE2WFh1JCyVpw6mH3yEz7wb5_SmKQ-qLwxA3vyJgGPk7lvad6sxT1DBWfBkIgNIwEWaF8TzHa56BN0YrT5VBOJgYgev0cnxuVsYV2-ig4yGXBl4-NDsYFcMxFmElFqh4d5z_FhMQrtMWUbOccv5758obWBZ2LuevTZP2u2Q8coUUSmbSE0yFAD4hniIqlINRmBuDoXy7ySt7amEYUIYBSmUGYkUxU8qeboUFSx-B8iAj6swsw3SiIjfKnVOar6zPTvCzxehzUH1CU_-isIaBxvd6n5wUzRr0_aIQ7TLENxu8F4ow_r0ma7wU5UE3-nL2EE76Dt09rBqWLwrDUFSkbtLGR8RUWuY3FBPhk1S4rdZApI7fgj-6ESsw44da9VDJBEi26eN8EeiIjjBBkV47uE8KxPWT3oApArJe5Ia_0bQWTjbIOHW1oPThvpTxDQ3siofRiK5cSWO2zboGvzU1nWxnsCsnyntpL0o5e8prscSM2YfTX-S4uBQ3EGJ_TDIH3bnFEPuueCCSBjHi=w989-h742-no",
186 | "https://lh3.googleusercontent.com/ngayLnnbyDUp10Zf7C2ggJn15dvDQzHQwr5baBYTmI_SXinhLT5HwqraLIBh3wyqpAOdy5Twe96r2My08R9Kew03P074ymAfLF0Jp4BqikY14wn3_aMObPvOMyKTAxtVyqIxPg4AkKQPWAzE780Qk9dmHk46vImTM7rHby0nZLLLJQ2vL-Q7FzlPTVISQ2Scf6eY5pXZ3LNj79wYkzvAg06aFfRaYL2CFRlsWqEb_2C8ZlUNS_kckzHbWqtVJOAl-5tJFACGfVBySdwLUBPfu0Atw9DLPQ6EBuSFz1aVTZ1ynkyzRAqFrMrT_LAHUWFXGLfFJ4M0iKcJHjBtwxzye5O3rchRj3SQtJAO5b9EiwC3xhVUBPgZYd7X88pLt1wxXHUmSjFgVP0IkbyIbvsfIARWHqDflTnYvlPt8xCFirAfefEtQTXDn6cOoBjtWgsPd8PP3JIm1xy3PUNOVxKIzD5FrnLxfD5UkN_3m6u11RhDeytKrQJtC8wnE8955SpEKHzqcHy6l0rwx6XN-TddJjdQwixBrtugkPBQwwhNv_uErMMQhacEMvdIvv6lA6WqKbSEntN2WSqt9RI-0lucd3yFAc1pu_-zMX27jhYVRFR1QzEFFs7NWWMWyGF-25xviuNNnTk3-2_kchSTAIigf_NtRGGF36k8X81VDpmLBK7BGDgTHJjqLWWglSQcJBf_GREm32fRrCioP0ti9HUGQDGfcLwDZvoZ9qshh-m4eaNxa-0k=w716-h382-no",
187 | "https://lh3.googleusercontent.com/KBRjG274i0Iq7-JAQTz_MgSsRfSBtcsGMkMqjWcL374x_Q41y6sBVamm4Vu27J4NYpVgLT4y8tDH3H8RsRWTclb2MCZCyLmEFZrFoOVa2otd8OvyoJxXzeBV6Wu7Z4F0RkXs9sYZtQsJxWjPJvEe9kymqiL1PnndDYEMirMpyfTfDHAp1uKBdxRbhmgoof28Yu_7OHVJKhGJQzEMPCliApKju8WfsSbmROdgs-cRuMfLddoVaN_r2HWEYMqcbsf_XK7LVSII4JmJ6RwBN9YUqRVqyco0n3Nx2aCPlVg47NAcrE3RCQB5okbFCTGGzn0Evjx5rF4DPPM14GXqUstoRvgc5g1omC-_7Wq7fl6SvIf7pnaUuNZ5INRTIsep-Pqqt6Lv2BZSYNeE4PhkkjjNk4CVz9YcTGxOjdWxd67CD2tYpD29TEN2C6soPO9R0IW3XIgWnV411ZCfAwg_f6k-XbeX8Ig1VJ_STJ0p1gM24Z-NlSSKthpoGls7sNuexstr4SY9FLvmQDT_AyShjLZ_2wS20RsFYG5YLhYLPGgStA6pKl5l2oCtFERM_gAyz_x5Twf68qUh50z8lELrD8s7s7UCKV3qGnjGCSuAYIbgjy_J-cVTOUYxkVLJOPwQ-eQGGSMr_IDFrnhIThZsA7_HfmN2w-ilUsL7iSPTB-jtueWX5C_egAF8w8f-e4aZ1xiYNmAPq-o8UVqRlQJUQBRdaQJGmRuxCfFpBWqeAgJygayQduSU=w509-h382-no"
188 | };
189 |
190 | var breed = "Golden Retriever";
191 | var coatColor = "Yellow";
192 | var birthDate = new DateTime(2012, 04, 01);
193 |
194 | return new DogImagesModel(avatarUrl, websiteUrl, name, photosList, breed, coatColor, birthDate);
195 | }
196 |
197 | static DogImagesModel GenerateHermesModel()
198 | {
199 | var avatarUrl = "https://lh3.googleusercontent.com/9kWTrt54igZZj2pEb0y7WVjvosu8PGmT2YFtLg9bTO_-U4NqKkdPZ2i15n2nRCWN-bmyOjFTC4sf0vtK7HqBxLzqzn1_JHn0nptex-GyA7KCfvI2Lli2i1Y5gMbrcaKU_dWTTFxPvcWZEKEiOfGkXYFk8DfWas3uvrGsjE2SQs2dRMndcSttu-SaUuNBDoQROq0IEgnpFx6MS0H5GxlZFCKyDll2CsJfBPYMp2iFBQbKcBNc45Z7UFJDyJx8DxuHT3JYUIabdCFqSKzPXt6ibnlGTs4GFsBA77RIKsivEF2kDT-HXoTGY9M4vxwzgt-6M9-UCjuL-QM_Rci0jyRh08WnpqlkF1MemXIu6kKc7pA-e0gOkVMsoODJ6E1d9Wl95v2bc4FrgJzibHrIyh7LoIKWgV9ImXRXd7i2ZVAiMekbJwRWQUDu9VgvMjBpSW1Qtn6T55_XvA1WZiYamZ33FbDyDzxzYNXwyOAap7U593CDY-b_h2_6IBhVX8tW0WRQgB2igzM7dXtWgIdf2wSfK-7UvWzX9bOfYplIVjXbzxWQF_VYjb6nItW9T7NFXNkx6aipdymb_Cgv-_jbSVfWLYESuMy490DIO_NIvSXqwcAz8r7NOTBvnSp0wYZugdH2v7KKT7v2KZ1_rFi7JTbMof4KFHkFlwQ23aI81VfDls4YRkrikyO1Uf6qUlzJXeOSrAi1BlZXrMcfZJyYmOCDfRUVofMxnTtUiB5Gi9oeswl8-4uX=w509-h382-no";
200 | var websiteUrl = "";
201 | var name = "Hermes";
202 |
203 | var photosList = new List
204 | {
205 | "https://lh3.googleusercontent.com/Dj9eGzTuwvkpGtoS3YlHU4UHrtE1s3cyYmkWIbIzktU0OkxT21rveMJTf8P5lm3bI-qOidbPxZgRvt2BqjzxBL5yYUcKuJTBQxt7GoqpPTWSmc0kLAGKCAgsm7o7GRp-E1gnaOTYTliFilkcUy1S9X_Q6jXA_VuhVYj04mm41ofEE00FUzYz3FqAoUPHie7nyVfkow3qyQVHoGW7CSAHk0Ock6cXGKP9rJpcp-1FNlABRmeMNUrCBU70Sg5m5wHLeKiMOZLOyUILydD4yfKPWK29jo8zJoaNYV2KAWzhU0mA_scuRcbQ5eYCLdJGoBN9o0lZdDCc0tu84KpSDF7K_FWSh1FkModIE-oz_MkGqngiQrVgU9NXq-XHwTI4J1SNjt7wOitaq7s1Bat9P6T6_5ifPToypak8B-RI3NGU82UDOB4MnmplvQk7773eDH4O097wd-AvoDVQkSroaBGR0GMH1WKcC8horuKP_I0AbaOf4Fqk8d1MqaM3dQPPRMusVhghvwsSAYcr51Xt7INqZtxa0xANCC6SOcG6AMOk7H-W_iDWAbsC8ZGhtV6SPnPKPsGFUic07UpPGxq7a5djTQPSj1-7UjFsWICrMGcropksRQFp8ptsSmndiRRWzYhhasxZCdWUo1wEegaCCu8jXYUvXyYxwP1_zji74tOf9yspoCm3oIOb0nQrHOMe83KtxaPwE4z_0icKr7qJzkBSB3o3LaeLL7NnvfK5TIn0aUFJ3A4c=w509-h382-no",
206 | "https://lh3.googleusercontent.com/Q1jGh32k1Lq4wrAq0LWinVJforrWcPcCIcbDEnbdQ-7hBiKWckPoCB6OLSGEsCpIi1YKj_M7SsHf84ygReXTS89_azsLXS4C6Ijs7IhD6umSqHPhICZj5wavZS-RnsXTZMX-iZb7Ebgkh7yC0pV1Bp5ghUW48EFervfv6E4gs_kNywdQpCwCl6CGTT1FywebKTChzihjdhoxtCEy4oxsPXFRSVg34vOYhJtU5cEBJZ6nwbW-elZ5iq3D4pgNlX4ey2EJtXRedcxVuyBW78FgjrGjix000_PGd2TkaOBs5wNGLYerdUdNSCexT05jZ-aD0_JIy10rqq4ffsIhV585Euf3S5sUYVYYa62dwnjWtDLesR8G1MuNwZdThQmxnxkU5E2jHPfKXKkBpDsPsoUyqUAxTYdEL7qF1bqLRi-td_ahycwBivK3EeMoNxiC74EOQo5DbdahqWqqOnX4qyFxEjfGs36fV483FoeOvps9NyaCxb_ag9tdZAbOuTS6ChQs0s8ZpCmTzzNti-Zw33fuc7CWLTmTGku-9byXZNsCjUIsp-oZVmHoqMmgSvffnQqjvOecNdwHYIbtXZzfzhRCTVGxgDMaQSPp48cguoBAe7geawwUqCy-0U0vVSvH-4HFCIF8p2Y6UfzKo3Vhakwrp0b5fIG77xNDvJW-GfhG_Gk_zKK62czlTFQ_4LCL1xD50VF_mvryfHWou0_vo8xeK2BP_2JkuRvzQ5ZVWhVbDAxtUjxP=w509-h382-no",
207 | "https://lh3.googleusercontent.com/Htsg5lZJOfX0f8rKOwfbqU89ZJQslf8DWYiam0dHsMxb3-hq023Wcf03FCfXfDE-jSWbKr44SIdb9eoVSUloPlAH3XKg1aCPfCLFPweyBm3LLft1L3LtMj3UYQd7zlpHh6kLyp6EoxnOU_n1qe12wF1JjxCFtxw0GTu8wxJqnXIU_vz9LMbI8ggfm4tw-miNoizBGxFzrkrklK0lxWayhEpswUl9KaQa2YTWRTnVGLl00AdjpStHMkvUL3jE8B6zbCxZASr7I3DeHpGOyl0nE0OPK_PxwRblvUyT45PEYLBi4pYaxWOxI-gLEdYh7X025JLMzfJW-k7fmYtQWORLR1Vx38E-yga9WA_DAhtw_M2GnbK_ZXfuFD_cNlV1qaOdEg9rbnAiHsZGulu4EfuN03P4JyK30fQI4au5cjdVZKhhq3ln67fKShPWoHKFCSyCfSzJ7fhFS3Vj3jRIp06kG0RKPyBDnTSaNphPvKNQqpSTKJIRZZy_Ll_b1SxNg0HZ216CBzzZ4JCrlX11C_FNs50zAH-gPxwslTs1KgP397WmwAvqRtnDBueyJzauCz-yxU-NCzEdYDzDa6-SnGSDdeAD3lctilopRvogJ7sGOKkvuyjVl4XDs9RV3JjbpINHSLZIZ49MzBNlWGmyOlr7aSTzMAKLpU_fRhkwdODPt_5EuQ8CpqnT2rDJjIl9p9NjPB44hUcotUvXrlDIDYIdAyPHvr9wJehRfadyOf2-Ih9dE4t5=w287-h382-no"
208 | };
209 |
210 | var breed = "Shorkie";
211 | var coatColor = "Brown";
212 | var birthDate = new DateTime(2017, 05, 30);
213 |
214 | return new DogImagesModel(avatarUrl, websiteUrl, name, photosList, breed, coatColor, birthDate);
215 | }
216 | }
217 | }
218 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.API/DotNetGraphQL.API.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.API/GraphTypes/DogImagesGraphType.cs:
--------------------------------------------------------------------------------
1 | using DotNetGraphQL.Common;
2 | using GraphQL.Types;
3 |
4 | namespace DotNetGraphQL.API
5 | {
6 | class DogImagesGraphType : ImagesGraphType
7 | {
8 | public DogImagesGraphType() : base("Dog")
9 | {
10 | Field(x => x.Breed, false);
11 | Field("birthDate", resolve: x => x.Source?.BirthDate);
12 | Field(x => x.CoatColor, false);
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.API/GraphTypes/ImagesGraphType.cs:
--------------------------------------------------------------------------------
1 | using DotNetGraphQL.Common;
2 | using GraphQL.Types;
3 |
4 | namespace DotNetGraphQL.API
5 | {
6 | abstract class ImagesGraphType : ObjectGraphType where T : ImagesModel
7 | {
8 | protected ImagesGraphType(string name)
9 | {
10 | Name = name;
11 |
12 | Field(x => x.AvatarUrl, false);
13 | Field>>("imagesList", resolve: x => x.Source?.ImagesList);
14 | Field(x => x.Title, false);
15 | Field(x => x.WebsiteUrl, false);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.API/Program.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Threading.Tasks;
3 | using Microsoft.AspNetCore.Hosting;
4 | using Microsoft.Extensions.Hosting;
5 |
6 | namespace DotNetGraphQL.API
7 | {
8 | public static class Program
9 | {
10 | public static Task Main(string[] args)
11 | {
12 | var directory = Directory.GetCurrentDirectory();
13 |
14 | return new WebHostBuilder()
15 | .UseKestrel()
16 | .UseContentRoot(directory)
17 | .UseWebRoot(Path.Combine(directory, "Public"))
18 | .UseIISIntegration()
19 | .UseStartup()
20 | .Build()
21 | .RunAsync();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.API/Public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | GraphiQL
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.API/Public/style.css:
--------------------------------------------------------------------------------
1 | .graphiql-container,
2 | .graphiql-container button,
3 | .graphiql-container input {
4 | color: #141823;
5 | font-family:
6 | system,
7 | -apple-system,
8 | 'San Francisco',
9 | '.SFNSDisplay-Regular',
10 | 'Segoe UI',
11 | Segoe,
12 | 'Segoe WP',
13 | 'Helvetica Neue',
14 | helvetica,
15 | 'Lucida Grande',
16 | arial,
17 | sans-serif;
18 | font-size: 14px;
19 | }
20 |
21 | .graphiql-container {
22 | display: -webkit-box;
23 | display: -ms-flexbox;
24 | display: flex;
25 | -webkit-box-orient: horizontal;
26 | -webkit-box-direction: normal;
27 | -ms-flex-direction: row;
28 | flex-direction: row;
29 | height: 100%;
30 | margin: 0;
31 | overflow: hidden;
32 | width: 100%;
33 | }
34 |
35 | .graphiql-container .editorWrap {
36 | display: -webkit-box;
37 | display: -ms-flexbox;
38 | display: flex;
39 | -webkit-box-orient: vertical;
40 | -webkit-box-direction: normal;
41 | -ms-flex-direction: column;
42 | flex-direction: column;
43 | -webkit-box-flex: 1;
44 | -ms-flex: 1;
45 | flex: 1;
46 | overflow-x: hidden;
47 | }
48 |
49 | .graphiql-container .title {
50 | font-size: 18px;
51 | }
52 |
53 | .graphiql-container .title em {
54 | font-family: georgia;
55 | font-size: 19px;
56 | }
57 |
58 | .graphiql-container .topBarWrap {
59 | display: -webkit-box;
60 | display: -ms-flexbox;
61 | display: flex;
62 | -webkit-box-orient: horizontal;
63 | -webkit-box-direction: normal;
64 | -ms-flex-direction: row;
65 | flex-direction: row;
66 | }
67 |
68 | .graphiql-container .topBar {
69 | -webkit-box-align: center;
70 | -ms-flex-align: center;
71 | align-items: center;
72 | background: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#e2e2e2));
73 | background: linear-gradient(#f7f7f7, #e2e2e2);
74 | border-bottom: 1px solid #d0d0d0;
75 | cursor: default;
76 | display: -webkit-box;
77 | display: -ms-flexbox;
78 | display: flex;
79 | -webkit-box-orient: horizontal;
80 | -webkit-box-direction: normal;
81 | -ms-flex-direction: row;
82 | flex-direction: row;
83 | -webkit-box-flex: 1;
84 | -ms-flex: 1;
85 | flex: 1;
86 | height: 34px;
87 | overflow-y: visible;
88 | padding: 7px 14px 6px;
89 | -webkit-user-select: none;
90 | -moz-user-select: none;
91 | -ms-user-select: none;
92 | user-select: none;
93 | }
94 |
95 | .graphiql-container .toolbar {
96 | overflow-x: visible;
97 | display: -webkit-box;
98 | display: -ms-flexbox;
99 | display: flex;
100 | }
101 |
102 | .graphiql-container .docExplorerShow,
103 | .graphiql-container .historyShow {
104 | background: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#e2e2e2));
105 | background: linear-gradient(#f7f7f7, #e2e2e2);
106 | border-radius: 0;
107 | border-bottom: 1px solid #d0d0d0;
108 | border-right: none;
109 | border-top: none;
110 | color: #3B5998;
111 | cursor: pointer;
112 | font-size: 14px;
113 | margin: 0;
114 | outline: 0;
115 | padding: 2px 20px 0 18px;
116 | }
117 |
118 | .graphiql-container .docExplorerShow {
119 | border-left: 1px solid rgba(0, 0, 0, 0.2);
120 | }
121 |
122 | .graphiql-container .historyShow {
123 | border-right: 1px solid rgba(0, 0, 0, 0.2);
124 | border-left: 0;
125 | }
126 |
127 | .graphiql-container .docExplorerShow:before {
128 | border-left: 2px solid #3B5998;
129 | border-top: 2px solid #3B5998;
130 | content: '';
131 | display: inline-block;
132 | height: 9px;
133 | margin: 0 3px -1px 0;
134 | position: relative;
135 | -webkit-transform: rotate(-45deg);
136 | transform: rotate(-45deg);
137 | width: 9px;
138 | }
139 |
140 | .graphiql-container .editorBar {
141 | display: -webkit-box;
142 | display: -ms-flexbox;
143 | display: flex;
144 | -webkit-box-orient: horizontal;
145 | -webkit-box-direction: normal;
146 | -ms-flex-direction: row;
147 | flex-direction: row;
148 | -webkit-box-flex: 1;
149 | -ms-flex: 1;
150 | flex: 1;
151 | }
152 |
153 | .graphiql-container .queryWrap {
154 | display: -webkit-box;
155 | display: -ms-flexbox;
156 | display: flex;
157 | -webkit-box-orient: vertical;
158 | -webkit-box-direction: normal;
159 | -ms-flex-direction: column;
160 | flex-direction: column;
161 | -webkit-box-flex: 1;
162 | -ms-flex: 1;
163 | flex: 1;
164 | }
165 |
166 | .graphiql-container .resultWrap {
167 | border-left: solid 1px #e0e0e0;
168 | display: -webkit-box;
169 | display: -ms-flexbox;
170 | display: flex;
171 | -webkit-box-orient: vertical;
172 | -webkit-box-direction: normal;
173 | -ms-flex-direction: column;
174 | flex-direction: column;
175 | -webkit-box-flex: 1;
176 | -ms-flex: 1;
177 | flex: 1;
178 | position: relative;
179 | }
180 |
181 | .graphiql-container .docExplorerWrap,
182 | .graphiql-container .historyPaneWrap {
183 | background: white;
184 | -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
185 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
186 | position: relative;
187 | z-index: 3;
188 | }
189 |
190 | .graphiql-container .historyPaneWrap {
191 | min-width: 230px;
192 | z-index: 5;
193 | }
194 |
195 | .graphiql-container .docExplorerResizer {
196 | cursor: col-resize;
197 | height: 100%;
198 | left: -5px;
199 | position: absolute;
200 | top: 0;
201 | width: 10px;
202 | z-index: 10;
203 | }
204 |
205 | .graphiql-container .docExplorerHide {
206 | cursor: pointer;
207 | font-size: 18px;
208 | margin: -7px -8px -6px 0;
209 | padding: 18px 16px 15px 12px;
210 | }
211 |
212 | .graphiql-container div .query-editor {
213 | -webkit-box-flex: 1;
214 | -ms-flex: 1;
215 | flex: 1;
216 | position: relative;
217 | }
218 |
219 | .graphiql-container .variable-editor {
220 | display: -webkit-box;
221 | display: -ms-flexbox;
222 | display: flex;
223 | -webkit-box-orient: vertical;
224 | -webkit-box-direction: normal;
225 | -ms-flex-direction: column;
226 | flex-direction: column;
227 | height: 30px;
228 | position: relative;
229 | }
230 |
231 | .graphiql-container .variable-editor-title {
232 | background: #eeeeee;
233 | border-bottom: 1px solid #d6d6d6;
234 | border-top: 1px solid #e0e0e0;
235 | color: #777;
236 | font-variant: small-caps;
237 | font-weight: bold;
238 | letter-spacing: 1px;
239 | line-height: 14px;
240 | padding: 6px 0 8px 43px;
241 | text-transform: lowercase;
242 | -webkit-user-select: none;
243 | -moz-user-select: none;
244 | -ms-user-select: none;
245 | user-select: none;
246 | }
247 |
248 | .graphiql-container .codemirrorWrap {
249 | -webkit-box-flex: 1;
250 | -ms-flex: 1;
251 | flex: 1;
252 | height: 100%;
253 | position: relative;
254 | }
255 |
256 | .graphiql-container .result-window {
257 | -webkit-box-flex: 1;
258 | -ms-flex: 1;
259 | flex: 1;
260 | height: 100%;
261 | position: relative;
262 | }
263 |
264 | .graphiql-container .footer {
265 | background: #f6f7f8;
266 | border-left: 1px solid #e0e0e0;
267 | border-top: 1px solid #e0e0e0;
268 | margin-left: 12px;
269 | position: relative;
270 | }
271 |
272 | .graphiql-container .footer:before {
273 | background: #eeeeee;
274 | bottom: 0;
275 | content: " ";
276 | left: -13px;
277 | position: absolute;
278 | top: -1px;
279 | width: 12px;
280 | }
281 |
282 | /* No `.graphiql-container` here so themes can overwrite */
283 | .result-window .CodeMirror {
284 | background: #f6f7f8;
285 | }
286 |
287 | .graphiql-container .result-window .CodeMirror-gutters {
288 | background-color: #eeeeee;
289 | border-color: #e0e0e0;
290 | cursor: col-resize;
291 | }
292 |
293 | .graphiql-container .result-window .CodeMirror-foldgutter,
294 | .graphiql-container .result-window .CodeMirror-foldgutter-open:after,
295 | .graphiql-container .result-window .CodeMirror-foldgutter-folded:after {
296 | padding-left: 3px;
297 | }
298 |
299 | .graphiql-container .toolbar-button {
300 | background: #fdfdfd;
301 | background: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));
302 | background: linear-gradient(#f9f9f9, #ececec);
303 | border-radius: 3px;
304 | -webkit-box-shadow:
305 | inset 0 0 0 1px rgba(0,0,0,0.20),
306 | 0 1px 0 rgba(255,255,255, 0.7),
307 | inset 0 1px #fff;
308 | box-shadow:
309 | inset 0 0 0 1px rgba(0,0,0,0.20),
310 | 0 1px 0 rgba(255,255,255, 0.7),
311 | inset 0 1px #fff;
312 | color: #555;
313 | cursor: pointer;
314 | display: inline-block;
315 | margin: 0 5px;
316 | padding: 3px 11px 5px;
317 | text-decoration: none;
318 | text-overflow: ellipsis;
319 | white-space: nowrap;
320 | max-width: 150px;
321 | }
322 |
323 | .graphiql-container .toolbar-button:active {
324 | background: -webkit-gradient(linear, left top, left bottom, from(#ececec), to(#d5d5d5));
325 | background: linear-gradient(#ececec, #d5d5d5);
326 | -webkit-box-shadow:
327 | 0 1px 0 rgba(255, 255, 255, 0.7),
328 | inset 0 0 0 1px rgba(0,0,0,0.10),
329 | inset 0 1px 1px 1px rgba(0, 0, 0, 0.12),
330 | inset 0 0 5px rgba(0, 0, 0, 0.1);
331 | box-shadow:
332 | 0 1px 0 rgba(255, 255, 255, 0.7),
333 | inset 0 0 0 1px rgba(0,0,0,0.10),
334 | inset 0 1px 1px 1px rgba(0, 0, 0, 0.12),
335 | inset 0 0 5px rgba(0, 0, 0, 0.1);
336 | }
337 |
338 | .graphiql-container .toolbar-button.error {
339 | background: -webkit-gradient(linear, left top, left bottom, from(#fdf3f3), to(#e6d6d7));
340 | background: linear-gradient(#fdf3f3, #e6d6d7);
341 | color: #b00;
342 | }
343 |
344 | .graphiql-container .toolbar-button-group {
345 | margin: 0 5px;
346 | white-space: nowrap;
347 | }
348 |
349 | .graphiql-container .toolbar-button-group > * {
350 | margin: 0;
351 | }
352 |
353 | .graphiql-container .toolbar-button-group > *:not(:last-child) {
354 | border-top-right-radius: 0;
355 | border-bottom-right-radius: 0;
356 | }
357 |
358 | .graphiql-container .toolbar-button-group > *:not(:first-child) {
359 | border-top-left-radius: 0;
360 | border-bottom-left-radius: 0;
361 | margin-left: -1px;
362 | }
363 |
364 | .graphiql-container .execute-button-wrap {
365 | height: 34px;
366 | margin: 0 14px 0 28px;
367 | position: relative;
368 | }
369 |
370 | .graphiql-container .execute-button {
371 | background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#d2d3d6));
372 | background: linear-gradient(#fdfdfd, #d2d3d6);
373 | border-radius: 17px;
374 | border: 1px solid rgba(0,0,0,0.25);
375 | -webkit-box-shadow: 0 1px 0 #fff;
376 | box-shadow: 0 1px 0 #fff;
377 | cursor: pointer;
378 | fill: #444;
379 | height: 34px;
380 | margin: 0;
381 | padding: 0;
382 | width: 34px;
383 | }
384 |
385 | .graphiql-container .execute-button svg {
386 | pointer-events: none;
387 | }
388 |
389 | .graphiql-container .execute-button:active {
390 | background: -webkit-gradient(linear, left top, left bottom, from(#e6e6e6), to(#c3c3c3));
391 | background: linear-gradient(#e6e6e6, #c3c3c3);
392 | -webkit-box-shadow:
393 | 0 1px 0 #fff,
394 | inset 0 0 2px rgba(0, 0, 0, 0.2),
395 | inset 0 0 6px rgba(0, 0, 0, 0.1);
396 | box-shadow:
397 | 0 1px 0 #fff,
398 | inset 0 0 2px rgba(0, 0, 0, 0.2),
399 | inset 0 0 6px rgba(0, 0, 0, 0.1);
400 | }
401 |
402 | .graphiql-container .execute-button:focus {
403 | outline: 0;
404 | }
405 |
406 | .graphiql-container .toolbar-menu,
407 | .graphiql-container .toolbar-select {
408 | position: relative;
409 | }
410 |
411 | .graphiql-container .execute-options,
412 | .graphiql-container .toolbar-menu-items,
413 | .graphiql-container .toolbar-select-options {
414 | background: #fff;
415 | -webkit-box-shadow:
416 | 0 0 0 1px rgba(0,0,0,0.1),
417 | 0 2px 4px rgba(0,0,0,0.25);
418 | box-shadow:
419 | 0 0 0 1px rgba(0,0,0,0.1),
420 | 0 2px 4px rgba(0,0,0,0.25);
421 | margin: 0;
422 | padding: 6px 0;
423 | position: absolute;
424 | z-index: 100;
425 | }
426 |
427 | .graphiql-container .execute-options {
428 | min-width: 100px;
429 | top: 37px;
430 | left: -1px;
431 | }
432 |
433 | .graphiql-container .toolbar-menu-items {
434 | left: 1px;
435 | margin-top: -1px;
436 | min-width: 110%;
437 | top: 100%;
438 | visibility: hidden;
439 | }
440 |
441 | .graphiql-container .toolbar-menu-items.open {
442 | visibility: visible;
443 | }
444 |
445 | .graphiql-container .toolbar-select-options {
446 | left: 0;
447 | min-width: 100%;
448 | top: -5px;
449 | visibility: hidden;
450 | }
451 |
452 | .graphiql-container .toolbar-select-options.open {
453 | visibility: visible;
454 | }
455 |
456 | .graphiql-container .execute-options > li,
457 | .graphiql-container .toolbar-menu-items > li,
458 | .graphiql-container .toolbar-select-options > li {
459 | cursor: pointer;
460 | display: block;
461 | margin: none;
462 | max-width: 300px;
463 | overflow: hidden;
464 | padding: 2px 20px 4px 11px;
465 | text-overflow: ellipsis;
466 | white-space: nowrap;
467 | }
468 |
469 | .graphiql-container .execute-options > li.selected,
470 | .graphiql-container .toolbar-menu-items > li.hover,
471 | .graphiql-container .toolbar-menu-items > li:active,
472 | .graphiql-container .toolbar-menu-items > li:hover,
473 | .graphiql-container .toolbar-select-options > li.hover,
474 | .graphiql-container .toolbar-select-options > li:active,
475 | .graphiql-container .toolbar-select-options > li:hover,
476 | .graphiql-container .history-contents > p:hover,
477 | .graphiql-container .history-contents > p:active {
478 | background: #e10098;
479 | color: #fff;
480 | }
481 |
482 | .graphiql-container .toolbar-select-options > li > svg {
483 | display: inline;
484 | fill: #666;
485 | margin: 0 -6px 0 6px;
486 | pointer-events: none;
487 | vertical-align: middle;
488 | }
489 |
490 | .graphiql-container .toolbar-select-options > li.hover > svg,
491 | .graphiql-container .toolbar-select-options > li:active > svg,
492 | .graphiql-container .toolbar-select-options > li:hover > svg {
493 | fill: #fff;
494 | }
495 |
496 | .graphiql-container .CodeMirror-scroll {
497 | overflow-scrolling: touch;
498 | }
499 |
500 | .graphiql-container .CodeMirror {
501 | color: #141823;
502 | font-family:
503 | 'Consolas',
504 | 'Inconsolata',
505 | 'Droid Sans Mono',
506 | 'Monaco',
507 | monospace;
508 | font-size: 13px;
509 | height: 100%;
510 | left: 0;
511 | position: absolute;
512 | top: 0;
513 | width: 100%;
514 | }
515 |
516 | .graphiql-container .CodeMirror-lines {
517 | padding: 20px 0;
518 | }
519 |
520 | .CodeMirror-hint-information .content {
521 | box-orient: vertical;
522 | color: #141823;
523 | display: -webkit-box;
524 | display: -ms-flexbox;
525 | display: flex;
526 | font-family: system, -apple-system, 'San Francisco', '.SFNSDisplay-Regular', 'Segoe UI', Segoe, 'Segoe WP', 'Helvetica Neue', helvetica, 'Lucida Grande', arial, sans-serif;
527 | font-size: 13px;
528 | line-clamp: 3;
529 | line-height: 16px;
530 | max-height: 48px;
531 | overflow: hidden;
532 | text-overflow: -o-ellipsis-lastline;
533 | }
534 |
535 | .CodeMirror-hint-information .content p:first-child {
536 | margin-top: 0;
537 | }
538 |
539 | .CodeMirror-hint-information .content p:last-child {
540 | margin-bottom: 0;
541 | }
542 |
543 | .CodeMirror-hint-information .infoType {
544 | color: #CA9800;
545 | cursor: pointer;
546 | display: inline;
547 | margin-right: 0.5em;
548 | }
549 |
550 | .autoInsertedLeaf.cm-property {
551 | -webkit-animation-duration: 6s;
552 | animation-duration: 6s;
553 | -webkit-animation-name: insertionFade;
554 | animation-name: insertionFade;
555 | border-bottom: 2px solid rgba(255, 255, 255, 0);
556 | border-radius: 2px;
557 | margin: -2px -4px -1px;
558 | padding: 2px 4px 1px;
559 | }
560 |
561 | @-webkit-keyframes insertionFade {
562 | from, to {
563 | background: rgba(255, 255, 255, 0);
564 | border-color: rgba(255, 255, 255, 0);
565 | }
566 |
567 | 15%, 85% {
568 | background: #fbffc9;
569 | border-color: #f0f3c0;
570 | }
571 | }
572 |
573 | @keyframes insertionFade {
574 | from, to {
575 | background: rgba(255, 255, 255, 0);
576 | border-color: rgba(255, 255, 255, 0);
577 | }
578 |
579 | 15%, 85% {
580 | background: #fbffc9;
581 | border-color: #f0f3c0;
582 | }
583 | }
584 |
585 | div.CodeMirror-lint-tooltip {
586 | background-color: white;
587 | border-radius: 2px;
588 | border: 0;
589 | color: #141823;
590 | -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
591 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
592 | font-family:
593 | system,
594 | -apple-system,
595 | 'San Francisco',
596 | '.SFNSDisplay-Regular',
597 | 'Segoe UI',
598 | Segoe,
599 | 'Segoe WP',
600 | 'Helvetica Neue',
601 | helvetica,
602 | 'Lucida Grande',
603 | arial,
604 | sans-serif;
605 | font-size: 13px;
606 | line-height: 16px;
607 | max-width: 430px;
608 | opacity: 0;
609 | padding: 8px 10px;
610 | -webkit-transition: opacity 0.15s;
611 | transition: opacity 0.15s;
612 | white-space: pre-wrap;
613 | }
614 |
615 | div.CodeMirror-lint-tooltip > * {
616 | padding-left: 23px;
617 | }
618 |
619 | div.CodeMirror-lint-tooltip > * + * {
620 | margin-top: 12px;
621 | }
622 |
623 | /* COLORS */
624 |
625 | .graphiql-container .CodeMirror-foldmarker {
626 | border-radius: 4px;
627 | background: #08f;
628 | background: -webkit-gradient(linear, left top, left bottom, from(#43A8FF), to(#0F83E8));
629 | background: linear-gradient(#43A8FF, #0F83E8);
630 | -webkit-box-shadow:
631 | 0 1px 1px rgba(0, 0, 0, 0.2),
632 | inset 0 0 0 1px rgba(0, 0, 0, 0.1);
633 | box-shadow:
634 | 0 1px 1px rgba(0, 0, 0, 0.2),
635 | inset 0 0 0 1px rgba(0, 0, 0, 0.1);
636 | color: white;
637 | font-family: arial;
638 | font-size: 12px;
639 | line-height: 0;
640 | margin: 0 3px;
641 | padding: 0px 4px 1px;
642 | text-shadow: 0 -1px rgba(0, 0, 0, 0.1);
643 | }
644 |
645 | .graphiql-container div.CodeMirror span.CodeMirror-matchingbracket {
646 | color: #555;
647 | text-decoration: underline;
648 | }
649 |
650 | .graphiql-container div.CodeMirror span.CodeMirror-nonmatchingbracket {
651 | color: #f00;
652 | }
653 |
654 | /* Comment */
655 | .cm-comment {
656 | color: #999;
657 | }
658 |
659 | /* Punctuation */
660 | .cm-punctuation {
661 | color: #555;
662 | }
663 |
664 | /* Keyword */
665 | .cm-keyword {
666 | color: #B11A04;
667 | }
668 |
669 | /* OperationName, FragmentName */
670 | .cm-def {
671 | color: #D2054E;
672 | }
673 |
674 | /* FieldName */
675 | .cm-property {
676 | color: #1F61A0;
677 | }
678 |
679 | /* FieldAlias */
680 | .cm-qualifier {
681 | color: #1C92A9;
682 | }
683 |
684 | /* ArgumentName and ObjectFieldName */
685 | .cm-attribute {
686 | color: #8B2BB9;
687 | }
688 |
689 | /* Number */
690 | .cm-number {
691 | color: #2882F9;
692 | }
693 |
694 | /* String */
695 | .cm-string {
696 | color: #D64292;
697 | }
698 |
699 | /* Boolean */
700 | .cm-builtin {
701 | color: #D47509;
702 | }
703 |
704 | /* EnumValue */
705 | .cm-string-2 {
706 | color: #0B7FC7;
707 | }
708 |
709 | /* Variable */
710 | .cm-variable {
711 | color: #397D13;
712 | }
713 |
714 | /* Directive */
715 | .cm-meta {
716 | color: #B33086;
717 | }
718 |
719 | /* Type */
720 | .cm-atom {
721 | color: #CA9800;
722 | }
723 | /* BASICS */
724 |
725 | .CodeMirror {
726 | /* Set height, width, borders, and global font properties here */
727 | color: black;
728 | font-family: monospace;
729 | height: 300px;
730 | }
731 |
732 | /* PADDING */
733 |
734 | .CodeMirror-lines {
735 | padding: 4px 0; /* Vertical padding around content */
736 | }
737 | .CodeMirror pre {
738 | padding: 0 4px; /* Horizontal padding of content */
739 | }
740 |
741 | .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
742 | background-color: white; /* The little square between H and V scrollbars */
743 | }
744 |
745 | /* GUTTER */
746 |
747 | .CodeMirror-gutters {
748 | border-right: 1px solid #ddd;
749 | background-color: #f7f7f7;
750 | white-space: nowrap;
751 | }
752 | .CodeMirror-linenumbers {}
753 | .CodeMirror-linenumber {
754 | color: #999;
755 | min-width: 20px;
756 | padding: 0 3px 0 5px;
757 | text-align: right;
758 | white-space: nowrap;
759 | }
760 |
761 | .CodeMirror-guttermarker { color: black; }
762 | .CodeMirror-guttermarker-subtle { color: #999; }
763 |
764 | /* CURSOR */
765 |
766 | .CodeMirror .CodeMirror-cursor {
767 | border-left: 1px solid black;
768 | }
769 | /* Shown when moving in bi-directional text */
770 | .CodeMirror div.CodeMirror-secondarycursor {
771 | border-left: 1px solid silver;
772 | }
773 | .CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
774 | background: #7e7;
775 | border: 0;
776 | width: auto;
777 | }
778 | .CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
779 | z-index: 1;
780 | }
781 |
782 | .cm-animate-fat-cursor {
783 | -webkit-animation: blink 1.06s steps(1) infinite;
784 | animation: blink 1.06s steps(1) infinite;
785 | border: 0;
786 | width: auto;
787 | }
788 | @-webkit-keyframes blink {
789 | 0% { background: #7e7; }
790 | 50% { background: none; }
791 | 100% { background: #7e7; }
792 | }
793 | @keyframes blink {
794 | 0% { background: #7e7; }
795 | 50% { background: none; }
796 | 100% { background: #7e7; }
797 | }
798 |
799 | /* Can style cursor different in overwrite (non-insert) mode */
800 | div.CodeMirror-overwrite div.CodeMirror-cursor {}
801 |
802 | .cm-tab { display: inline-block; text-decoration: inherit; }
803 |
804 | .CodeMirror-ruler {
805 | border-left: 1px solid #ccc;
806 | position: absolute;
807 | }
808 |
809 | /* DEFAULT THEME */
810 |
811 | .cm-s-default .cm-keyword {color: #708;}
812 | .cm-s-default .cm-atom {color: #219;}
813 | .cm-s-default .cm-number {color: #164;}
814 | .cm-s-default .cm-def {color: #00f;}
815 | .cm-s-default .cm-variable,
816 | .cm-s-default .cm-punctuation,
817 | .cm-s-default .cm-property,
818 | .cm-s-default .cm-operator {}
819 | .cm-s-default .cm-variable-2 {color: #05a;}
820 | .cm-s-default .cm-variable-3 {color: #085;}
821 | .cm-s-default .cm-comment {color: #a50;}
822 | .cm-s-default .cm-string {color: #a11;}
823 | .cm-s-default .cm-string-2 {color: #f50;}
824 | .cm-s-default .cm-meta {color: #555;}
825 | .cm-s-default .cm-qualifier {color: #555;}
826 | .cm-s-default .cm-builtin {color: #30a;}
827 | .cm-s-default .cm-bracket {color: #997;}
828 | .cm-s-default .cm-tag {color: #170;}
829 | .cm-s-default .cm-attribute {color: #00c;}
830 | .cm-s-default .cm-header {color: blue;}
831 | .cm-s-default .cm-quote {color: #090;}
832 | .cm-s-default .cm-hr {color: #999;}
833 | .cm-s-default .cm-link {color: #00c;}
834 |
835 | .cm-negative {color: #d44;}
836 | .cm-positive {color: #292;}
837 | .cm-header, .cm-strong {font-weight: bold;}
838 | .cm-em {font-style: italic;}
839 | .cm-link {text-decoration: underline;}
840 | .cm-strikethrough {text-decoration: line-through;}
841 |
842 | .cm-s-default .cm-error {color: #f00;}
843 | .cm-invalidchar {color: #f00;}
844 |
845 | .CodeMirror-composing { border-bottom: 2px solid; }
846 |
847 | /* Default styles for common addons */
848 |
849 | div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
850 | div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
851 | .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
852 | .CodeMirror-activeline-background {background: #e8f2ff;}
853 |
854 | /* STOP */
855 |
856 | /* The rest of this file contains styles related to the mechanics of
857 | the editor. You probably shouldn't touch them. */
858 |
859 | .CodeMirror {
860 | background: white;
861 | overflow: hidden;
862 | position: relative;
863 | }
864 |
865 | .CodeMirror-scroll {
866 | height: 100%;
867 | /* 30px is the magic margin used to hide the element's real scrollbars */
868 | /* See overflow: hidden in .CodeMirror */
869 | margin-bottom: -30px; margin-right: -30px;
870 | outline: none; /* Prevent dragging from highlighting the element */
871 | overflow: scroll !important; /* Things will break if this is overridden */
872 | padding-bottom: 30px;
873 | position: relative;
874 | }
875 | .CodeMirror-sizer {
876 | border-right: 30px solid transparent;
877 | position: relative;
878 | }
879 |
880 | /* The fake, visible scrollbars. Used to force redraw during scrolling
881 | before actual scrolling happens, thus preventing shaking and
882 | flickering artifacts. */
883 | .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
884 | display: none;
885 | position: absolute;
886 | z-index: 6;
887 | }
888 | .CodeMirror-vscrollbar {
889 | overflow-x: hidden;
890 | overflow-y: scroll;
891 | right: 0; top: 0;
892 | }
893 | .CodeMirror-hscrollbar {
894 | bottom: 0; left: 0;
895 | overflow-x: scroll;
896 | overflow-y: hidden;
897 | }
898 | .CodeMirror-scrollbar-filler {
899 | right: 0; bottom: 0;
900 | }
901 | .CodeMirror-gutter-filler {
902 | left: 0; bottom: 0;
903 | }
904 |
905 | .CodeMirror-gutters {
906 | min-height: 100%;
907 | position: absolute; left: 0; top: 0;
908 | z-index: 3;
909 | }
910 | .CodeMirror-gutter {
911 | display: inline-block;
912 | height: 100%;
913 | margin-bottom: -30px;
914 | vertical-align: top;
915 | white-space: normal;
916 | /* Hack to make IE7 behave */
917 | *zoom:1;
918 | *display:inline;
919 | }
920 | .CodeMirror-gutter-wrapper {
921 | background: none !important;
922 | border: none !important;
923 | position: absolute;
924 | z-index: 4;
925 | }
926 | .CodeMirror-gutter-background {
927 | position: absolute;
928 | top: 0; bottom: 0;
929 | z-index: 4;
930 | }
931 | .CodeMirror-gutter-elt {
932 | cursor: default;
933 | position: absolute;
934 | z-index: 4;
935 | }
936 | .CodeMirror-gutter-wrapper {
937 | -webkit-user-select: none;
938 | -moz-user-select: none;
939 | -ms-user-select: none;
940 | user-select: none;
941 | }
942 |
943 | .CodeMirror-lines {
944 | cursor: text;
945 | min-height: 1px; /* prevents collapsing before first draw */
946 | }
947 | .CodeMirror pre {
948 | -webkit-tap-highlight-color: transparent;
949 | /* Reset some styles that the rest of the page might have set */
950 | background: transparent;
951 | border-radius: 0;
952 | border-width: 0;
953 | color: inherit;
954 | font-family: inherit;
955 | font-size: inherit;
956 | -webkit-font-variant-ligatures: none;
957 | font-variant-ligatures: none;
958 | line-height: inherit;
959 | margin: 0;
960 | overflow: visible;
961 | position: relative;
962 | white-space: pre;
963 | word-wrap: normal;
964 | z-index: 2;
965 | }
966 | .CodeMirror-wrap pre {
967 | word-wrap: break-word;
968 | white-space: pre-wrap;
969 | word-break: normal;
970 | }
971 |
972 | .CodeMirror-linebackground {
973 | position: absolute;
974 | left: 0; right: 0; top: 0; bottom: 0;
975 | z-index: 0;
976 | }
977 |
978 | .CodeMirror-linewidget {
979 | overflow: auto;
980 | position: relative;
981 | z-index: 2;
982 | }
983 |
984 | .CodeMirror-widget {}
985 |
986 | .CodeMirror-code {
987 | outline: none;
988 | }
989 |
990 | /* Force content-box sizing for the elements where we expect it */
991 | .CodeMirror-scroll,
992 | .CodeMirror-sizer,
993 | .CodeMirror-gutter,
994 | .CodeMirror-gutters,
995 | .CodeMirror-linenumber {
996 | -webkit-box-sizing: content-box;
997 | box-sizing: content-box;
998 | }
999 |
1000 | .CodeMirror-measure {
1001 | height: 0;
1002 | overflow: hidden;
1003 | position: absolute;
1004 | visibility: hidden;
1005 | width: 100%;
1006 | }
1007 |
1008 | .CodeMirror-cursor { position: absolute; }
1009 | .CodeMirror-measure pre { position: static; }
1010 |
1011 | div.CodeMirror-cursors {
1012 | position: relative;
1013 | visibility: hidden;
1014 | z-index: 3;
1015 | }
1016 | div.CodeMirror-dragcursors {
1017 | visibility: visible;
1018 | }
1019 |
1020 | .CodeMirror-focused div.CodeMirror-cursors {
1021 | visibility: visible;
1022 | }
1023 |
1024 | .CodeMirror-selected { background: #d9d9d9; }
1025 | .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
1026 | .CodeMirror-crosshair { cursor: crosshair; }
1027 | .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
1028 | .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
1029 | .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
1030 |
1031 | .cm-searching {
1032 | background: #ffa;
1033 | background: rgba(255, 255, 0, .4);
1034 | }
1035 |
1036 | /* IE7 hack to prevent it from returning funny offsetTops on the spans */
1037 | .CodeMirror span { *vertical-align: text-bottom; }
1038 |
1039 | /* Used to force a border model for a node */
1040 | .cm-force-border { padding-right: .1px; }
1041 |
1042 | @media print {
1043 | /* Hide the cursor when printing */
1044 | .CodeMirror div.CodeMirror-cursors {
1045 | visibility: hidden;
1046 | }
1047 | }
1048 |
1049 | /* See issue #2901 */
1050 | .cm-tab-wrap-hack:after { content: ''; }
1051 |
1052 | /* Help users use markselection to safely style text background */
1053 | span.CodeMirror-selectedtext { background: none; }
1054 |
1055 | .CodeMirror-dialog {
1056 | background: inherit;
1057 | color: inherit;
1058 | left: 0; right: 0;
1059 | overflow: hidden;
1060 | padding: .1em .8em;
1061 | position: absolute;
1062 | z-index: 15;
1063 | }
1064 |
1065 | .CodeMirror-dialog-top {
1066 | border-bottom: 1px solid #eee;
1067 | top: 0;
1068 | }
1069 |
1070 | .CodeMirror-dialog-bottom {
1071 | border-top: 1px solid #eee;
1072 | bottom: 0;
1073 | }
1074 |
1075 | .CodeMirror-dialog input {
1076 | background: transparent;
1077 | border: 1px solid #d3d6db;
1078 | color: inherit;
1079 | font-family: monospace;
1080 | outline: none;
1081 | width: 20em;
1082 | }
1083 |
1084 | .CodeMirror-dialog button {
1085 | font-size: 70%;
1086 | }
1087 | .graphiql-container .doc-explorer {
1088 | background: white;
1089 | }
1090 |
1091 | .graphiql-container .doc-explorer-title-bar,
1092 | .graphiql-container .history-title-bar {
1093 | cursor: default;
1094 | display: -webkit-box;
1095 | display: -ms-flexbox;
1096 | display: flex;
1097 | height: 34px;
1098 | line-height: 14px;
1099 | padding: 8px 8px 5px;
1100 | position: relative;
1101 | -webkit-user-select: none;
1102 | -moz-user-select: none;
1103 | -ms-user-select: none;
1104 | user-select: none;
1105 | }
1106 |
1107 | .graphiql-container .doc-explorer-title,
1108 | .graphiql-container .history-title {
1109 | -webkit-box-flex: 1;
1110 | -ms-flex: 1;
1111 | flex: 1;
1112 | font-weight: bold;
1113 | overflow-x: hidden;
1114 | padding: 10px 0 10px 10px;
1115 | text-align: center;
1116 | text-overflow: ellipsis;
1117 | -webkit-user-select: initial;
1118 | -moz-user-select: initial;
1119 | -ms-user-select: initial;
1120 | user-select: initial;
1121 | white-space: nowrap;
1122 | }
1123 |
1124 | .graphiql-container .doc-explorer-back {
1125 | color: #3B5998;
1126 | cursor: pointer;
1127 | margin: -7px 0 -6px -8px;
1128 | overflow-x: hidden;
1129 | padding: 17px 12px 16px 16px;
1130 | text-overflow: ellipsis;
1131 | white-space: nowrap;
1132 | }
1133 |
1134 | .doc-explorer-narrow .doc-explorer-back {
1135 | width: 0;
1136 | }
1137 |
1138 | .graphiql-container .doc-explorer-back:before {
1139 | border-left: 2px solid #3B5998;
1140 | border-top: 2px solid #3B5998;
1141 | content: '';
1142 | display: inline-block;
1143 | height: 9px;
1144 | margin: 0 3px -1px 0;
1145 | position: relative;
1146 | -webkit-transform: rotate(-45deg);
1147 | transform: rotate(-45deg);
1148 | width: 9px;
1149 | }
1150 |
1151 | .graphiql-container .doc-explorer-rhs {
1152 | position: relative;
1153 | }
1154 |
1155 | .graphiql-container .doc-explorer-contents,
1156 | .graphiql-container .history-contents {
1157 | background-color: #ffffff;
1158 | border-top: 1px solid #d6d6d6;
1159 | bottom: 0;
1160 | left: 0;
1161 | overflow-y: auto;
1162 | padding: 20px 15px;
1163 | position: absolute;
1164 | right: 0;
1165 | top: 47px;
1166 | }
1167 |
1168 | .graphiql-container .doc-explorer-contents {
1169 | min-width: 300px;
1170 | }
1171 |
1172 | .graphiql-container .doc-type-description p:first-child ,
1173 | .graphiql-container .doc-type-description blockquote:first-child {
1174 | margin-top: 0;
1175 | }
1176 |
1177 | .graphiql-container .doc-explorer-contents a {
1178 | cursor: pointer;
1179 | text-decoration: none;
1180 | }
1181 |
1182 | .graphiql-container .doc-explorer-contents a:hover {
1183 | text-decoration: underline;
1184 | }
1185 |
1186 | .graphiql-container .doc-value-description > :first-child {
1187 | margin-top: 4px;
1188 | }
1189 |
1190 | .graphiql-container .doc-value-description > :last-child {
1191 | margin-bottom: 4px;
1192 | }
1193 |
1194 | .graphiql-container .doc-category {
1195 | margin: 20px 0;
1196 | }
1197 |
1198 | .graphiql-container .doc-category-title {
1199 | border-bottom: 1px solid #e0e0e0;
1200 | color: #777;
1201 | cursor: default;
1202 | font-size: 14px;
1203 | font-variant: small-caps;
1204 | font-weight: bold;
1205 | letter-spacing: 1px;
1206 | margin: 0 -15px 10px 0;
1207 | padding: 10px 0;
1208 | -webkit-user-select: none;
1209 | -moz-user-select: none;
1210 | -ms-user-select: none;
1211 | user-select: none;
1212 | }
1213 |
1214 | .graphiql-container .doc-category-item {
1215 | margin: 12px 0;
1216 | color: #555;
1217 | }
1218 |
1219 | .graphiql-container .keyword {
1220 | color: #B11A04;
1221 | }
1222 |
1223 | .graphiql-container .type-name {
1224 | color: #CA9800;
1225 | }
1226 |
1227 | .graphiql-container .field-name {
1228 | color: #1F61A0;
1229 | }
1230 |
1231 | .graphiql-container .field-short-description {
1232 | color: #999;
1233 | margin-left: 5px;
1234 | overflow: hidden;
1235 | text-overflow: ellipsis;
1236 | }
1237 |
1238 | .graphiql-container .enum-value {
1239 | color: #0B7FC7;
1240 | }
1241 |
1242 | .graphiql-container .arg-name {
1243 | color: #8B2BB9;
1244 | }
1245 |
1246 | .graphiql-container .arg {
1247 | display: block;
1248 | margin-left: 1em;
1249 | }
1250 |
1251 | .graphiql-container .arg:first-child:last-child,
1252 | .graphiql-container .arg:first-child:nth-last-child(2),
1253 | .graphiql-container .arg:first-child:nth-last-child(2) ~ .arg {
1254 | display: inherit;
1255 | margin: inherit;
1256 | }
1257 |
1258 | .graphiql-container .arg:first-child:nth-last-child(2):after {
1259 | content: ', ';
1260 | }
1261 |
1262 | .graphiql-container .arg-default-value {
1263 | color: #43A047;
1264 | }
1265 |
1266 | .graphiql-container .doc-deprecation {
1267 | background: #fffae8;
1268 | -webkit-box-shadow: inset 0 0 1px #bfb063;
1269 | box-shadow: inset 0 0 1px #bfb063;
1270 | color: #867F70;
1271 | line-height: 16px;
1272 | margin: 8px -8px;
1273 | max-height: 80px;
1274 | overflow: hidden;
1275 | padding: 8px;
1276 | border-radius: 3px;
1277 | }
1278 |
1279 | .graphiql-container .doc-deprecation:before {
1280 | content: 'Deprecated:';
1281 | color: #c79b2e;
1282 | cursor: default;
1283 | display: block;
1284 | font-size: 9px;
1285 | font-weight: bold;
1286 | letter-spacing: 1px;
1287 | line-height: 1;
1288 | padding-bottom: 5px;
1289 | text-transform: uppercase;
1290 | -webkit-user-select: none;
1291 | -moz-user-select: none;
1292 | -ms-user-select: none;
1293 | user-select: none;
1294 | }
1295 |
1296 | .graphiql-container .doc-deprecation > :first-child {
1297 | margin-top: 0;
1298 | }
1299 |
1300 | .graphiql-container .doc-deprecation > :last-child {
1301 | margin-bottom: 0;
1302 | }
1303 |
1304 | .graphiql-container .show-btn {
1305 | -webkit-appearance: initial;
1306 | display: block;
1307 | border-radius: 3px;
1308 | border: solid 1px #ccc;
1309 | text-align: center;
1310 | padding: 8px 12px 10px;
1311 | width: 100%;
1312 | -webkit-box-sizing: border-box;
1313 | box-sizing: border-box;
1314 | background: #fbfcfc;
1315 | color: #555;
1316 | cursor: pointer;
1317 | }
1318 |
1319 | .graphiql-container .search-box {
1320 | border-bottom: 1px solid #d3d6db;
1321 | display: block;
1322 | font-size: 14px;
1323 | margin: -15px -15px 12px 0;
1324 | position: relative;
1325 | }
1326 |
1327 | .graphiql-container .search-box:before {
1328 | content: '\26B2';
1329 | cursor: pointer;
1330 | display: block;
1331 | font-size: 24px;
1332 | position: absolute;
1333 | top: -2px;
1334 | -webkit-transform: rotate(-45deg);
1335 | transform: rotate(-45deg);
1336 | -webkit-user-select: none;
1337 | -moz-user-select: none;
1338 | -ms-user-select: none;
1339 | user-select: none;
1340 | }
1341 |
1342 | .graphiql-container .search-box .search-box-clear {
1343 | background-color: #d0d0d0;
1344 | border-radius: 12px;
1345 | color: #fff;
1346 | cursor: pointer;
1347 | font-size: 11px;
1348 | padding: 1px 5px 2px;
1349 | position: absolute;
1350 | right: 3px;
1351 | top: 8px;
1352 | -webkit-user-select: none;
1353 | -moz-user-select: none;
1354 | -ms-user-select: none;
1355 | user-select: none;
1356 | }
1357 |
1358 | .graphiql-container .search-box .search-box-clear:hover {
1359 | background-color: #b9b9b9;
1360 | }
1361 |
1362 | .graphiql-container .search-box > input {
1363 | border: none;
1364 | -webkit-box-sizing: border-box;
1365 | box-sizing: border-box;
1366 | font-size: 14px;
1367 | outline: none;
1368 | padding: 6px 24px 8px 20px;
1369 | width: 100%;
1370 | }
1371 |
1372 | .graphiql-container .error-container {
1373 | font-weight: bold;
1374 | left: 0;
1375 | letter-spacing: 1px;
1376 | opacity: 0.5;
1377 | position: absolute;
1378 | right: 0;
1379 | text-align: center;
1380 | text-transform: uppercase;
1381 | top: 50%;
1382 | -webkit-transform: translate(0, -50%);
1383 | transform: translate(0, -50%);
1384 | }
1385 | .CodeMirror-foldmarker {
1386 | color: blue;
1387 | cursor: pointer;
1388 | font-family: arial;
1389 | line-height: .3;
1390 | text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
1391 | }
1392 | .CodeMirror-foldgutter {
1393 | width: .7em;
1394 | }
1395 | .CodeMirror-foldgutter-open,
1396 | .CodeMirror-foldgutter-folded {
1397 | cursor: pointer;
1398 | }
1399 | .CodeMirror-foldgutter-open:after {
1400 | content: "\25BE";
1401 | }
1402 | .CodeMirror-foldgutter-folded:after {
1403 | content: "\25B8";
1404 | }
1405 | .graphiql-container .history-contents,
1406 | .graphiql-container .history-contents input {
1407 | font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace;
1408 | padding: 0;
1409 | }
1410 |
1411 | .graphiql-container .history-contents p {
1412 | -webkit-box-align: center;
1413 | -ms-flex-align: center;
1414 | align-items: center;
1415 | display: -webkit-box;
1416 | display: -ms-flexbox;
1417 | display: flex;
1418 | font-size: 12px;
1419 | overflow: hidden;
1420 | text-overflow: ellipsis;
1421 | white-space: nowrap;
1422 | margin: 0;
1423 | padding: 8px;
1424 | border-bottom: 1px solid #e0e0e0;
1425 | }
1426 |
1427 | .graphiql-container .history-contents p.editable {
1428 | padding-bottom: 6px;
1429 | padding-top: 7px;
1430 | }
1431 |
1432 | .graphiql-container .history-contents input {
1433 | -webkit-box-flex: 1;
1434 | -ms-flex-positive: 1;
1435 | flex-grow: 1;
1436 | font-size: 12px;
1437 | }
1438 |
1439 | .graphiql-container .history-contents p:hover {
1440 | cursor: pointer;
1441 | }
1442 |
1443 | .graphiql-container .history-contents p span.history-label {
1444 | -webkit-box-flex: 1;
1445 | -ms-flex-positive: 1;
1446 | flex-grow: 1;
1447 | overflow: hidden;
1448 | text-overflow: ellipsis;
1449 | }.CodeMirror-info {
1450 | background: white;
1451 | border-radius: 2px;
1452 | -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
1453 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
1454 | -webkit-box-sizing: border-box;
1455 | box-sizing: border-box;
1456 | color: #555;
1457 | font-family:
1458 | system,
1459 | -apple-system,
1460 | 'San Francisco',
1461 | '.SFNSDisplay-Regular',
1462 | 'Segoe UI',
1463 | Segoe,
1464 | 'Segoe WP',
1465 | 'Helvetica Neue',
1466 | helvetica,
1467 | 'Lucida Grande',
1468 | arial,
1469 | sans-serif;
1470 | font-size: 13px;
1471 | line-height: 16px;
1472 | margin: 8px -8px;
1473 | max-width: 400px;
1474 | opacity: 0;
1475 | overflow: hidden;
1476 | padding: 8px 8px;
1477 | position: fixed;
1478 | -webkit-transition: opacity 0.15s;
1479 | transition: opacity 0.15s;
1480 | z-index: 50;
1481 | }
1482 |
1483 | .CodeMirror-info :first-child {
1484 | margin-top: 0;
1485 | }
1486 |
1487 | .CodeMirror-info :last-child {
1488 | margin-bottom: 0;
1489 | }
1490 |
1491 | .CodeMirror-info p {
1492 | margin: 1em 0;
1493 | }
1494 |
1495 | .CodeMirror-info .info-description {
1496 | color: #777;
1497 | line-height: 16px;
1498 | margin-top: 1em;
1499 | max-height: 80px;
1500 | overflow: hidden;
1501 | }
1502 |
1503 | .CodeMirror-info .info-deprecation {
1504 | background: #fffae8;
1505 | -webkit-box-shadow: inset 0 1px 1px -1px #bfb063;
1506 | box-shadow: inset 0 1px 1px -1px #bfb063;
1507 | color: #867F70;
1508 | line-height: 16px;
1509 | margin: -8px;
1510 | margin-top: 8px;
1511 | max-height: 80px;
1512 | overflow: hidden;
1513 | padding: 8px;
1514 | }
1515 |
1516 | .CodeMirror-info .info-deprecation-label {
1517 | color: #c79b2e;
1518 | cursor: default;
1519 | display: block;
1520 | font-size: 9px;
1521 | font-weight: bold;
1522 | letter-spacing: 1px;
1523 | line-height: 1;
1524 | padding-bottom: 5px;
1525 | text-transform: uppercase;
1526 | -webkit-user-select: none;
1527 | -moz-user-select: none;
1528 | -ms-user-select: none;
1529 | user-select: none;
1530 | }
1531 |
1532 | .CodeMirror-info .info-deprecation-label + * {
1533 | margin-top: 0;
1534 | }
1535 |
1536 | .CodeMirror-info a {
1537 | text-decoration: none;
1538 | }
1539 |
1540 | .CodeMirror-info a:hover {
1541 | text-decoration: underline;
1542 | }
1543 |
1544 | .CodeMirror-info .type-name {
1545 | color: #CA9800;
1546 | }
1547 |
1548 | .CodeMirror-info .field-name {
1549 | color: #1F61A0;
1550 | }
1551 |
1552 | .CodeMirror-info .enum-value {
1553 | color: #0B7FC7;
1554 | }
1555 |
1556 | .CodeMirror-info .arg-name {
1557 | color: #8B2BB9;
1558 | }
1559 |
1560 | .CodeMirror-info .directive-name {
1561 | color: #B33086;
1562 | }
1563 | .CodeMirror-jump-token {
1564 | text-decoration: underline;
1565 | cursor: pointer;
1566 | }
1567 | /* The lint marker gutter */
1568 | .CodeMirror-lint-markers {
1569 | width: 16px;
1570 | }
1571 |
1572 | .CodeMirror-lint-tooltip {
1573 | background-color: infobackground;
1574 | border-radius: 4px 4px 4px 4px;
1575 | border: 1px solid black;
1576 | color: infotext;
1577 | font-family: monospace;
1578 | font-size: 10pt;
1579 | max-width: 600px;
1580 | opacity: 0;
1581 | overflow: hidden;
1582 | padding: 2px 5px;
1583 | position: fixed;
1584 | -webkit-transition: opacity .4s;
1585 | transition: opacity .4s;
1586 | white-space: pre-wrap;
1587 | z-index: 100;
1588 | }
1589 |
1590 | .CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning {
1591 | background-position: left bottom;
1592 | background-repeat: repeat-x;
1593 | }
1594 |
1595 | .CodeMirror-lint-mark-error {
1596 | background-image:
1597 | url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")
1598 | ;
1599 | }
1600 |
1601 | .CodeMirror-lint-mark-warning {
1602 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
1603 | }
1604 |
1605 | .CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning {
1606 | background-position: center center;
1607 | background-repeat: no-repeat;
1608 | cursor: pointer;
1609 | display: inline-block;
1610 | height: 16px;
1611 | position: relative;
1612 | vertical-align: middle;
1613 | width: 16px;
1614 | }
1615 |
1616 | .CodeMirror-lint-message-error, .CodeMirror-lint-message-warning {
1617 | background-position: top left;
1618 | background-repeat: no-repeat;
1619 | padding-left: 18px;
1620 | }
1621 |
1622 | .CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {
1623 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=");
1624 | }
1625 |
1626 | .CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {
1627 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=");
1628 | }
1629 |
1630 | .CodeMirror-lint-marker-multiple {
1631 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");
1632 | background-position: right bottom;
1633 | background-repeat: no-repeat;
1634 | width: 100%; height: 100%;
1635 | }
1636 | .graphiql-container .spinner-container {
1637 | height: 36px;
1638 | left: 50%;
1639 | position: absolute;
1640 | top: 50%;
1641 | -webkit-transform: translate(-50%, -50%);
1642 | transform: translate(-50%, -50%);
1643 | width: 36px;
1644 | z-index: 10;
1645 | }
1646 |
1647 | .graphiql-container .spinner {
1648 | -webkit-animation: rotation .6s infinite linear;
1649 | animation: rotation .6s infinite linear;
1650 | border-bottom: 6px solid rgba(150, 150, 150, .15);
1651 | border-left: 6px solid rgba(150, 150, 150, .15);
1652 | border-radius: 100%;
1653 | border-right: 6px solid rgba(150, 150, 150, .15);
1654 | border-top: 6px solid rgba(150, 150, 150, .8);
1655 | display: inline-block;
1656 | height: 24px;
1657 | position: absolute;
1658 | vertical-align: middle;
1659 | width: 24px;
1660 | }
1661 |
1662 | @-webkit-keyframes rotation {
1663 | from { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
1664 | to { -webkit-transform: rotate(359deg); transform: rotate(359deg); }
1665 | }
1666 |
1667 | @keyframes rotation {
1668 | from { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
1669 | to { -webkit-transform: rotate(359deg); transform: rotate(359deg); }
1670 | }
1671 | .CodeMirror-hints {
1672 | background: white;
1673 | -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
1674 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
1675 | font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace;
1676 | font-size: 13px;
1677 | list-style: none;
1678 | margin-left: -6px;
1679 | margin: 0;
1680 | max-height: 14.5em;
1681 | overflow-y: auto;
1682 | overflow: hidden;
1683 | padding: 0;
1684 | position: absolute;
1685 | z-index: 10;
1686 | }
1687 |
1688 | .CodeMirror-hint {
1689 | border-top: solid 1px #f7f7f7;
1690 | color: #141823;
1691 | cursor: pointer;
1692 | margin: 0;
1693 | max-width: 300px;
1694 | overflow: hidden;
1695 | padding: 2px 6px;
1696 | white-space: pre;
1697 | }
1698 |
1699 | li.CodeMirror-hint-active {
1700 | background-color: #08f;
1701 | border-top-color: white;
1702 | color: white;
1703 | }
1704 |
1705 | .CodeMirror-hint-information {
1706 | border-top: solid 1px #c0c0c0;
1707 | max-width: 300px;
1708 | padding: 4px 6px;
1709 | position: relative;
1710 | z-index: 1;
1711 | }
1712 |
1713 | .CodeMirror-hint-information:first-child {
1714 | border-bottom: solid 1px #c0c0c0;
1715 | border-top: none;
1716 | margin-bottom: -1px;
1717 | }
1718 |
1719 | .CodeMirror-hint-deprecation {
1720 | background: #fffae8;
1721 | -webkit-box-shadow: inset 0 1px 1px -1px #bfb063;
1722 | box-shadow: inset 0 1px 1px -1px #bfb063;
1723 | color: #867F70;
1724 | font-family:
1725 | system,
1726 | -apple-system,
1727 | 'San Francisco',
1728 | '.SFNSDisplay-Regular',
1729 | 'Segoe UI',
1730 | Segoe,
1731 | 'Segoe WP',
1732 | 'Helvetica Neue',
1733 | helvetica,
1734 | 'Lucida Grande',
1735 | arial,
1736 | sans-serif;
1737 | font-size: 13px;
1738 | line-height: 16px;
1739 | margin-top: 4px;
1740 | max-height: 80px;
1741 | overflow: hidden;
1742 | padding: 6px;
1743 | }
1744 |
1745 | .CodeMirror-hint-deprecation .deprecation-label {
1746 | color: #c79b2e;
1747 | cursor: default;
1748 | display: block;
1749 | font-size: 9px;
1750 | font-weight: bold;
1751 | letter-spacing: 1px;
1752 | line-height: 1;
1753 | padding-bottom: 5px;
1754 | text-transform: uppercase;
1755 | -webkit-user-select: none;
1756 | -moz-user-select: none;
1757 | -ms-user-select: none;
1758 | user-select: none;
1759 | }
1760 |
1761 | .CodeMirror-hint-deprecation .deprecation-label + * {
1762 | margin-top: 0;
1763 | }
1764 |
1765 | .CodeMirror-hint-deprecation :last-child {
1766 | margin-bottom: 0;
1767 | }
1768 | html, body {
1769 | height: 100%;
1770 | margin: 0;
1771 | overflow: hidden;
1772 | width: 100%;
1773 | }
1774 |
1775 | #app {
1776 | height: 100vh;
1777 | }
1778 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.API/Schemas/GraphQLSchema.cs:
--------------------------------------------------------------------------------
1 | using GraphQL.Types;
2 |
3 | namespace DotNetGraphQL.API
4 | {
5 | public class ImagesSchema : Schema
6 | {
7 | public ImagesSchema() => Query = new ImagesQuery();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.API/Schemas/ImagesQuery.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using DotNetGraphQL.Common;
5 | using GraphQL;
6 | using GraphQL.Types;
7 |
8 | namespace DotNetGraphQL.API
9 | {
10 | public class ImagesQuery : ObjectGraphType
11 | {
12 | public ImagesQuery()
13 | {
14 | Name = "Query";
15 |
16 | Field>("dogs", "Query for dogs", resolve: context => DogImagesData.DogImages);
17 | Field("dog", "Query a specific dog",
18 | new QueryArguments(new QueryArgument> { Name = "name", Description = "Dog Name" }),
19 | context => DogImagesData.DogImages.Single(x => x.Title.Equals(context.GetArgument("name"), StringComparison.OrdinalIgnoreCase)));
20 | Field>("dogsByCoatColorOrBreed", "Query dogs by coat color or breed",
21 | new QueryArguments(
22 | new QueryArgument { Name = "coatColor", Description = "Dog Coat Color" },
23 | new QueryArgument { Name = "breed", Description = "Dog Breed" }),
24 | context => GetDogImagesByNameOrBreed(context.GetArgument("coatColor"), context.GetArgument("breed")));
25 | }
26 |
27 | static IEnumerable GetDogImagesByNameOrBreed(string? coatColor, string? breed) => (string.IsNullOrWhiteSpace(coatColor), string.IsNullOrWhiteSpace(breed)) switch
28 | {
29 | (true, true) => DogImagesData.DogImages.Where(x => x.CoatColor.Equals(coatColor, StringComparison.OrdinalIgnoreCase) && x.Breed.Equals(breed, StringComparison.OrdinalIgnoreCase)),
30 | (true, false) => DogImagesData.DogImages.Where(x => x.CoatColor.Equals(coatColor, StringComparison.OrdinalIgnoreCase)),
31 | (false, true) => DogImagesData.DogImages.Where(x => x.Breed.Equals(breed, StringComparison.OrdinalIgnoreCase)),
32 | (false, false) => throw new ArgumentException($"{nameof(DogImagesModel.CoatColor)} and {nameof(DogImagesModel.Breed)} cannot both be null")
33 | };
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.API/Startup.cs:
--------------------------------------------------------------------------------
1 | using GraphQL.Server;
2 | using Microsoft.AspNetCore.Builder;
3 | using Microsoft.AspNetCore.Hosting;
4 | using Microsoft.AspNetCore.Http;
5 | using Microsoft.AspNetCore.Server.Kestrel.Core;
6 | using Microsoft.Extensions.DependencyInjection;
7 | using Microsoft.Extensions.Hosting;
8 | using Microsoft.Extensions.Logging;
9 |
10 | namespace DotNetGraphQL.API
11 | {
12 | public class Startup
13 | {
14 | public static void ConfigureServices(IServiceCollection services)
15 | {
16 | services.Configure(options => options.AllowSynchronousIO = true);
17 |
18 | services.AddSingleton();
19 |
20 | services.AddGraphQL(options => options.EnableMetrics = false)
21 | .AddErrorInfoProvider(options => options.ExposeExceptionStackTrace = true)
22 | .AddNewtonsoftJson();
23 |
24 | services.AddCors(options => options.AddPolicy("AllowAll", p => p.AllowAnyOrigin()
25 | .AllowAnyMethod()
26 | .AllowAnyHeader()));
27 | services.AddLogging(builder => builder.AddConsole());
28 | services.AddSingleton();
29 | }
30 |
31 | public static void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
32 | {
33 | if (env.IsDevelopment())
34 | app.UseDeveloperExceptionPage();
35 |
36 | app.UseCors("AllowAll");
37 |
38 | app.UseDefaultFiles();
39 | app.UseStaticFiles();
40 |
41 | app.UseGraphQL("/");
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.API/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Debug",
5 | "System": "Information",
6 | "Microsoft": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.API/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | },
9 | "AllowedHosts": "*"
10 | }
11 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.Common/DotNetGraphQL.Common.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.Common/Models/DogImagesGraphQLResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 |
4 | namespace DotNetGraphQL.Common
5 | {
6 | public class DogImagesGraphQLResponse
7 | {
8 | public DogImagesGraphQLResponse(IEnumerable dogs) => Dogs = dogs.ToList();
9 |
10 | public IReadOnlyList Dogs { get; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.Common/Models/DogImagesModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace DotNetGraphQL.Common
5 | {
6 | public class DogImagesModel : ImagesModel
7 | {
8 | public DogImagesModel(string avatarUrl, string websiteUrl, string title, IEnumerable imagesList, string breed, string coatColor, DateTime? birthDate = null)
9 | : base(avatarUrl, websiteUrl, title, imagesList)
10 | {
11 | (Breed, BirthDate, CoatColor) = (breed, birthDate, coatColor);
12 | }
13 |
14 | public string Breed { get; }
15 | public DateTime? BirthDate { get; }
16 | public string CoatColor { get; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.Common/Models/ImagesModel.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using System.Collections.Generic;
3 |
4 | namespace DotNetGraphQL.Common
5 | {
6 | public abstract class ImagesModel
7 | {
8 | protected ImagesModel(string avatarUrl, string websiteUrl, string title, IEnumerable imagesList) =>
9 | (AvatarUrl, WebsiteUrl, Title, ImagesList) = (avatarUrl, websiteUrl, title, imagesList.ToArray());
10 |
11 | public string AvatarUrl { get; }
12 | public string WebsiteUrl { get; }
13 | public string Title { get; }
14 | public IReadOnlyList ImagesList { get; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.Mobile.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 your 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 |
--------------------------------------------------------------------------------
/Source/DotNetGraphQL.Mobile.Android/CustomRenderers/LabelCustomRenderer.cs:
--------------------------------------------------------------------------------
1 | using Android.Content;
2 | using DotNetGraphQL.Droid;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Platform.Android;
5 |
6 | //workaround for https://github.com/xamarin/Xamarin.Forms/issues/8626 and https://github.com/xamarin/Xamarin.Forms/issues/8986
7 |
8 | [assembly: ExportRenderer(typeof(Label), typeof(LabelCustomRenderer))]
9 | namespace DotNetGraphQL.Droid
10 | {
11 | class LabelCustomRenderer : Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer
12 | {
13 | public LabelCustomRenderer(Context context) : base(context)
14 | {
15 |
16 | }
17 |
18 | protected override void OnElementChanged(ElementChangedEventArgs