├── src
├── app
│ ├── cards
│ │ ├── cards.page.scss
│ │ ├── cards.page.html
│ │ ├── cards.module.ts
│ │ ├── cards.page.spec.ts
│ │ └── cards.page.ts
│ ├── home
│ │ ├── home.page.scss
│ │ ├── home.module.ts
│ │ ├── home.page.html
│ │ ├── home.page.spec.ts
│ │ └── home.page.ts
│ ├── login
│ │ ├── login.page.scss
│ │ ├── login.page.html
│ │ ├── login.page.spec.ts
│ │ ├── login.module.ts
│ │ └── login.page.ts
│ ├── card-details
│ │ ├── card-details.page.scss
│ │ ├── card-details.module.ts
│ │ ├── card-details.page.spec.ts
│ │ ├── card-details.page.html
│ │ └── card-details.page.ts
│ ├── app.component.html
│ ├── quiz
│ │ ├── quiz.page.scss
│ │ ├── quiz.module.ts
│ │ ├── quiz.page.spec.ts
│ │ ├── quiz.page.html
│ │ └── quiz.page.ts
│ ├── api.service.spec.ts
│ ├── auth-guard.service.spec.ts
│ ├── auth-guard.service.ts
│ ├── app-routing.module.ts
│ ├── app.component.ts
│ ├── app.module.ts
│ ├── app.component.spec.ts
│ └── api.service.ts
├── environments
│ ├── environment.prod.ts
│ └── environment.ts
├── assets
│ └── icon
│ │ └── favicon.png
├── tsconfig.app.json
├── tsconfig.spec.json
├── global.scss
├── main.ts
├── test.ts
├── index.html
├── karma.conf.js
├── graphql
│ ├── subscriptions.graphql
│ ├── mutations.graphql
│ ├── queries.graphql
│ └── schema.json
├── theme
│ ├── amplify.scss
│ └── variables.scss
└── polyfills.ts
├── ionic.config.json
├── e2e
├── tsconfig.e2e.json
├── src
│ ├── app.po.ts
│ └── app.e2e-spec.ts
└── protractor.conf.js
├── tsconfig.json
├── .gitignore
├── README.md
├── package.json
├── tslint.json
└── angular.json
/src/app/cards/cards.page.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/app/home/home.page.scss:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/app/login/login.page.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/app/card-details/card-details.page.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/ionic.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "quiz-app",
3 | "integrations": {},
4 | "type": "angular"
5 | }
6 |
--------------------------------------------------------------------------------
/src/assets/icon/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashteya/ionic4-tutorial-appsync/HEAD/src/assets/icon/favicon.png
--------------------------------------------------------------------------------
/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "baseUrl": "./",
6 | "module": "commonjs",
7 | "target": "es5"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class AppPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.deepCss('app-root ion-content')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "baseUrl": "./",
6 | "module": "es2015",
7 | "experimentalDecorators": true
8 | },
9 | "exclude": [
10 | "test.ts",
11 | "**/*.spec.ts"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/src/app/quiz/quiz.page.scss:
--------------------------------------------------------------------------------
1 | ion-card {
2 | min-height: 70%;
3 | width: 100%;
4 | }
5 |
6 | ion-card p {
7 | font-size: 16px;
8 | color: #000;
9 | }
10 |
11 | ion-slides {
12 | height: 100%;
13 | }
14 |
15 | .question {
16 | font-weight: bold;
17 | padding-bottom: 40px;
18 | }
19 |
20 | .answer {
21 | text-align: left;
22 | }
23 |
--------------------------------------------------------------------------------
/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { AppPage } from './app.po';
2 |
3 | describe('new App', () => {
4 | let page: AppPage;
5 |
6 | beforeEach(() => {
7 | page = new AppPage();
8 | });
9 |
10 | it('should display welcome message', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toContain('The world is your oyster.');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "outDir": "./dist/out-tsc",
5 | "sourceMap": true,
6 | "declaration": false,
7 | "moduleResolution": "node",
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "target": "es5",
11 | "lib": [
12 | "es2017",
13 | "dom"
14 | ]
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/app/api.service.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed } from '@angular/core/testing';
2 |
3 | import { APIService } from './api.service';
4 |
5 | describe('ApiService', () => {
6 | beforeEach(() => TestBed.configureTestingModule({}));
7 |
8 | it('should be created', () => {
9 | const service: APIService = TestBed.get(APIService);
10 | expect(service).toBeTruthy();
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "baseUrl": "./",
6 | "module": "commonjs",
7 | "types": [
8 | "jasmine",
9 | "node"
10 | ]
11 | },
12 | "files": [
13 | "test.ts"
14 | ],
15 | "include": [
16 | "polyfills.ts",
17 | "**/*.spec.ts",
18 | "**/*.d.ts"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/src/app/auth-guard.service.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed } from '@angular/core/testing';
2 |
3 | import { AuthGuardService } from './auth-guard.service';
4 |
5 | describe('AuthGuardService', () => {
6 | beforeEach(() => TestBed.configureTestingModule({}));
7 |
8 | it('should be created', () => {
9 | const service: AuthGuardService = TestBed.get(AuthGuardService);
10 | expect(service).toBeTruthy();
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/src/global.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/theming/
2 | @import "~@ionic/angular/css/core.css";
3 | @import "~@ionic/angular/css/normalize.css";
4 | @import "~@ionic/angular/css/structure.css";
5 | @import "~@ionic/angular/css/typography.css";
6 |
7 | @import "~@ionic/angular/css/padding.css";
8 | @import "~@ionic/angular/css/float-elements.css";
9 | @import "~@ionic/angular/css/text-alignment.css";
10 | @import "~@ionic/angular/css/text-transformation.css";
11 | @import "~@ionic/angular/css/flex-utils.css";
12 |
13 | @import "~@aws-amplify/ui/src/Angular.css";
14 | @import "theme/amplify.scss";
15 |
--------------------------------------------------------------------------------
/src/app/login/login.page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Quiz App
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | My Decks
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/app/home/home.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { IonicModule } from '@ionic/angular';
4 | import { FormsModule } from '@angular/forms';
5 | import { RouterModule } from '@angular/router';
6 |
7 | import { HomePage } from './home.page';
8 |
9 | @NgModule({
10 | imports: [
11 | CommonModule,
12 | FormsModule,
13 | IonicModule,
14 | RouterModule.forChild([
15 | {
16 | path: '',
17 | component: HomePage
18 | }
19 | ])
20 | ],
21 | declarations: [HomePage]
22 | })
23 | export class HomePageModule {}
24 |
--------------------------------------------------------------------------------
/src/app/cards/cards.page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ deck?.name }}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | {{ card.question }}
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Specifies intentionally untracked files to ignore when using Git
2 | # http://git-scm.com/docs/gitignore
3 |
4 | *~
5 | *.sw[mnpcod]
6 | *.log
7 | *.tmp
8 | *.tmp.*
9 | log.txt
10 | *.sublime-project
11 | *.sublime-workspace
12 | .vscode/
13 | npm-debug.log*
14 |
15 | .idea/
16 | .ionic/
17 | .sourcemaps/
18 | .sass-cache/
19 | .tmp/
20 | .versions/
21 | coverage/
22 | www/
23 | node_modules/
24 | tmp/
25 | temp/
26 | platforms/
27 | plugins/
28 | plugins/android.json
29 | plugins/ios.json
30 | $RECYCLE.BIN/
31 |
32 | .DS_Store
33 | Thumbs.db
34 | UserInterfaceState.xcuserstate
35 |
36 | amplify
37 | aws-exports.js
38 | .graphqlconfig.yml
39 | .amplifyrc
40 |
--------------------------------------------------------------------------------
/src/app/quiz/quiz.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { FormsModule } from '@angular/forms';
4 | import { Routes, RouterModule } from '@angular/router';
5 |
6 | import { IonicModule } from '@ionic/angular';
7 |
8 | import { QuizPage } from './quiz.page';
9 |
10 | const routes: Routes = [
11 | {
12 | path: '',
13 | component: QuizPage
14 | }
15 | ];
16 |
17 | @NgModule({
18 | imports: [
19 | CommonModule,
20 | FormsModule,
21 | IonicModule,
22 | RouterModule.forChild(routes)
23 | ],
24 | declarations: [QuizPage]
25 | })
26 | export class QuizPageModule {}
27 |
--------------------------------------------------------------------------------
/src/app/cards/cards.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { FormsModule } from '@angular/forms';
4 | import { Routes, RouterModule } from '@angular/router';
5 |
6 | import { IonicModule } from '@ionic/angular';
7 |
8 | import { CardsPage } from './cards.page';
9 |
10 | const routes: Routes = [
11 | {
12 | path: '',
13 | component: CardsPage
14 | }
15 | ];
16 |
17 | @NgModule({
18 | imports: [
19 | CommonModule,
20 | FormsModule,
21 | IonicModule,
22 | RouterModule.forChild(routes)
23 | ],
24 | declarations: [CardsPage]
25 | })
26 | export class CardsPageModule {}
27 |
--------------------------------------------------------------------------------
/src/app/auth-guard.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { CanActivate, Router } from '@angular/router';
3 | import { Events } from '@ionic/angular'
4 |
5 | @Injectable({
6 | providedIn: 'root'
7 | })
8 | export class AuthGuardService implements CanActivate {
9 |
10 | signedIn = false;
11 |
12 | constructor(public router: Router, public events: Events) {
13 | this.events.subscribe('data:AuthState', async (data) => {
14 | this.signedIn = data.signedIn;
15 | })
16 | }
17 |
18 | canActivate() {
19 | if (!this.signedIn) {
20 | this.router.navigate(['/login']);
21 | }
22 | return this.signedIn;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | import API from '@aws-amplify/api';
8 | import PubSub from '@aws-amplify/PubSub';
9 | import awsConfig from './aws-exports.js';
10 | import Amplify from 'aws-amplify';
11 |
12 | PubSub.configure(awsConfig);
13 | API.configure(awsConfig);
14 | Amplify.configure(awsConfig);
15 |
16 | if (environment.production) {
17 | enableProdMode();
18 | }
19 |
20 | platformBrowserDynamic().bootstrapModule(AppModule)
21 | .catch(err => console.log(err));
22 |
--------------------------------------------------------------------------------
/src/app/card-details/card-details.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { FormsModule } from '@angular/forms';
4 | import { Routes, RouterModule } from '@angular/router';
5 |
6 | import { IonicModule } from '@ionic/angular';
7 |
8 | import { CardDetailsPage } from './card-details.page';
9 |
10 | const routes: Routes = [
11 | {
12 | path: '',
13 | component: CardDetailsPage
14 | }
15 | ];
16 |
17 | @NgModule({
18 | imports: [
19 | CommonModule,
20 | FormsModule,
21 | IonicModule,
22 | RouterModule.forChild(routes)
23 | ],
24 | declarations: [CardDetailsPage]
25 | })
26 | export class CardDetailsPageModule {}
27 |
--------------------------------------------------------------------------------
/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { Routes, RouterModule } from '@angular/router';
3 | import { AuthGuardService } from './auth-guard.service';
4 |
5 | const routes: Routes = [
6 | { path: '', redirectTo: 'home', pathMatch: 'full' },
7 | { path: 'home', loadChildren: './home/home.module#HomePageModule', canActivate: [AuthGuardService]},
8 | { path: 'cards/:id', loadChildren: './cards/cards.module#CardsPageModule', canActivate: [AuthGuardService] },
9 | { path: 'login', loadChildren: './login/login.module#LoginPageModule' },
10 | ];
11 |
12 | @NgModule({
13 | imports: [RouterModule.forRoot(routes)],
14 | exports: [RouterModule]
15 | })
16 | export class AppRoutingModule { }
17 |
--------------------------------------------------------------------------------
/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------
/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | import { Platform } from '@ionic/angular';
4 | import { SplashScreen } from '@ionic-native/splash-screen/ngx';
5 | import { StatusBar } from '@ionic-native/status-bar/ngx';
6 |
7 | @Component({
8 | selector: 'app-root',
9 | templateUrl: 'app.component.html'
10 | })
11 | export class AppComponent {
12 | constructor(
13 | private platform: Platform,
14 | private splashScreen: SplashScreen,
15 | private statusBar: StatusBar
16 | ) {
17 | this.initializeApp();
18 | }
19 |
20 | initializeApp() {
21 | this.platform.ready().then(() => {
22 | this.statusBar.styleDefault();
23 | this.splashScreen.hide();
24 | });
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ionic App
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/app/home/home.page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Quiz App
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | {{ deck.name }}
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | Quiz Me
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/app/quiz/quiz.page.spec.ts:
--------------------------------------------------------------------------------
1 | import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
3 |
4 | import { QuizPage } from './quiz.page';
5 |
6 | describe('QuizPage', () => {
7 | let component: QuizPage;
8 | let fixture: ComponentFixture;
9 |
10 | beforeEach(async(() => {
11 | TestBed.configureTestingModule({
12 | declarations: [ QuizPage ],
13 | schemas: [CUSTOM_ELEMENTS_SCHEMA],
14 | })
15 | .compileComponents();
16 | }));
17 |
18 | beforeEach(() => {
19 | fixture = TestBed.createComponent(QuizPage);
20 | component = fixture.componentInstance;
21 | fixture.detectChanges();
22 | });
23 |
24 | it('should create', () => {
25 | expect(component).toBeTruthy();
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/src/app/home/home.page.spec.ts:
--------------------------------------------------------------------------------
1 | import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
3 |
4 | import { HomePage } from './home.page';
5 |
6 | describe('HomePage', () => {
7 | let component: HomePage;
8 | let fixture: ComponentFixture;
9 |
10 | beforeEach(async(() => {
11 | TestBed.configureTestingModule({
12 | declarations: [ HomePage ],
13 | schemas: [CUSTOM_ELEMENTS_SCHEMA],
14 | })
15 | .compileComponents();
16 | }));
17 |
18 | beforeEach(() => {
19 | fixture = TestBed.createComponent(HomePage);
20 | component = fixture.componentInstance;
21 | fixture.detectChanges();
22 | });
23 |
24 | it('should create', () => {
25 | expect(component).toBeTruthy();
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/src/app/cards/cards.page.spec.ts:
--------------------------------------------------------------------------------
1 | import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
3 |
4 | import { CardsPage } from './cards.page';
5 |
6 | describe('CardsPage', () => {
7 | let component: CardsPage;
8 | let fixture: ComponentFixture;
9 |
10 | beforeEach(async(() => {
11 | TestBed.configureTestingModule({
12 | declarations: [ CardsPage ],
13 | schemas: [CUSTOM_ELEMENTS_SCHEMA],
14 | })
15 | .compileComponents();
16 | }));
17 |
18 | beforeEach(() => {
19 | fixture = TestBed.createComponent(CardsPage);
20 | component = fixture.componentInstance;
21 | fixture.detectChanges();
22 | });
23 |
24 | it('should create', () => {
25 | expect(component).toBeTruthy();
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/src/app/login/login.page.spec.ts:
--------------------------------------------------------------------------------
1 | import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
3 |
4 | import { LoginPage } from './login.page';
5 |
6 | describe('LoginPage', () => {
7 | let component: LoginPage;
8 | let fixture: ComponentFixture;
9 |
10 | beforeEach(async(() => {
11 | TestBed.configureTestingModule({
12 | declarations: [ LoginPage ],
13 | schemas: [CUSTOM_ELEMENTS_SCHEMA],
14 | })
15 | .compileComponents();
16 | }));
17 |
18 | beforeEach(() => {
19 | fixture = TestBed.createComponent(LoginPage);
20 | component = fixture.componentInstance;
21 | fixture.detectChanges();
22 | });
23 |
24 | it('should create', () => {
25 | expect(component).toBeTruthy();
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * In development mode, to ignore zone related error stack frames such as
11 | * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
12 | * import the following file, but please comment it out in production mode
13 | * because it will have performance impact when throw error
14 | */
15 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ionic4-tutorial-appsync
2 | This code is part of a tutorial on how to create an AWS AppSync GraphQL API and use that in an Ionic 4 app.
3 |
4 | Read the tutorial here: [Ionic 4 + AppSync: Build a mobile app with a GraphQL backend](https://gonehybrid.com/ionic-4-appsync-build-a-mobile-app-with-a-graphql-backend-part-1/)
5 |
6 | For more tutorials on Ionic, check out my blog [Gone Hybrid](http://gonehybrid.com).
7 |
8 | # How to run the app
9 | First, you'll need to follow the tutorial to set up the AppSync backend, see [part 2](https://gonehybrid.com/ionic-4-appsync-create-a-graphql-api-part-2/).
10 |
11 | Then, run `npm install` followed by the `ionic serve` command.
12 |
13 | Make sure you have all the tools installed, see [installation guide](http://gonehybrid.com/build-your-first-mobile-app-with-ionic-2-angular-2-part-2/).
14 |
--------------------------------------------------------------------------------
/e2e/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './src/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: 'e2e/tsconfig.e2e.json'
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/src/app/login/login.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { FormsModule } from '@angular/forms';
4 | import { Routes, RouterModule } from '@angular/router';
5 |
6 | import { IonicModule } from '@ionic/angular';
7 |
8 | import { LoginPage } from './login.page';
9 | import { AmplifyAngularModule, AmplifyIonicModule, AmplifyService } from 'aws-amplify-angular'
10 |
11 | const routes: Routes = [
12 | {
13 | path: '',
14 | component: LoginPage
15 | }
16 | ];
17 |
18 | @NgModule({
19 | imports: [
20 | CommonModule,
21 | FormsModule,
22 | IonicModule,
23 | RouterModule.forChild(routes),
24 | AmplifyAngularModule,
25 | AmplifyIonicModule
26 | ],
27 | declarations: [LoginPage],
28 | providers: [AmplifyService]
29 | })
30 | export class LoginPageModule {}
31 |
--------------------------------------------------------------------------------
/src/app/quiz/quiz.page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | {{ card.question }}
17 | Answer
18 |
19 | {{ card.answer }}
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/app/card-details/card-details.page.spec.ts:
--------------------------------------------------------------------------------
1 | import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
3 |
4 | import { CardDetailsPage } from './card-details.page';
5 |
6 | describe('CardDetailsPage', () => {
7 | let component: CardDetailsPage;
8 | let fixture: ComponentFixture;
9 |
10 | beforeEach(async(() => {
11 | TestBed.configureTestingModule({
12 | declarations: [ CardDetailsPage ],
13 | schemas: [CUSTOM_ELEMENTS_SCHEMA],
14 | })
15 | .compileComponents();
16 | }));
17 |
18 | beforeEach(() => {
19 | fixture = TestBed.createComponent(CardDetailsPage);
20 | component = fixture.componentInstance;
21 | fixture.detectChanges();
22 | });
23 |
24 | it('should create', () => {
25 | expect(component).toBeTruthy();
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/src/app/card-details/card-details.page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Card
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | Question
21 |
22 |
23 |
24 |
25 |
26 |
27 | Answer
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/app/login/login.page.ts:
--------------------------------------------------------------------------------
1 | import { Component, AfterContentInit } from '@angular/core';
2 | import { Events } from '@ionic/angular';
3 | import { AuthGuardService } from '../auth-guard.service'
4 | import { AmplifyService } from 'aws-amplify-angular';
5 | import { Router } from '@angular/router';
6 |
7 | @Component({
8 | selector: 'app-login',
9 | templateUrl: './login.page.html',
10 | styleUrls: ['./login.page.scss'],
11 | })
12 | export class LoginPage {
13 |
14 | authState: any;
15 |
16 | constructor(
17 | public events: Events,
18 | public authService: AuthGuardService,
19 | public amplifyService: AmplifyService,
20 | public router: Router
21 | ) {
22 | this.authState = { signedIn: false };
23 |
24 | this.amplifyService.authStateChange$
25 | .subscribe(authState => {
26 | this.authState.signedIn = authState.state === 'signedIn';
27 | this.events.publish('data:AuthState', this.authState);
28 | });
29 | }
30 |
31 | showDecks() {
32 | this.router.navigate(['/home']);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/1.0/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage-istanbul-reporter'),
13 | require('@angular-devkit/build-angular/plugins/karma')
14 | ],
15 | client: {
16 | clearContext: false // leave Jasmine Spec Runner output visible in browser
17 | },
18 | coverageIstanbulReporter: {
19 | dir: require('path').join(__dirname, '../coverage'),
20 | reports: ['html', 'lcovonly'],
21 | fixWebpackSourcePaths: true
22 | },
23 | reporters: ['progress', 'kjhtml'],
24 | port: 9876,
25 | colors: true,
26 | logLevel: config.LOG_INFO,
27 | autoWatch: true,
28 | browsers: ['Chrome'],
29 | singleRun: false
30 | });
31 | };
32 |
--------------------------------------------------------------------------------
/src/app/quiz/quiz.page.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from "@angular/core";
2 | import { ModalController, NavParams } from "@ionic/angular";
3 | import { APIService } from "../api.service";
4 |
5 | @Component({
6 | selector: "app-quiz",
7 | templateUrl: "./quiz.page.html",
8 | styleUrls: ["./quiz.page.scss"]
9 | })
10 | export class QuizPage implements OnInit {
11 | public cards;
12 |
13 | public cardIndex = 1;
14 |
15 | public slideOptions = {
16 | slidesPerView: 1.2,
17 | spaceBetween: -5,
18 | centeredSlides: true,
19 | pagination: {
20 | el: ".swiper-pagination",
21 | type: "fraction"
22 | }
23 | };
24 |
25 | constructor(
26 | public modalController: ModalController,
27 | private navParams: NavParams,
28 | public apiService: APIService
29 | ) { }
30 |
31 | ngOnInit() {
32 | this.apiService
33 | .SearchCards({
34 | question: {
35 | match: this.navParams.get('filter')
36 | }
37 | })
38 | .then(query => this.cards = query.items);
39 | }
40 |
41 | showAnswer(card) {
42 | card.displayAnswer = true;
43 | }
44 |
45 | async stop() {
46 | await this.modalController.dismiss();
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/graphql/subscriptions.graphql:
--------------------------------------------------------------------------------
1 | # this is an auto generated file. This will be overwritten
2 | subscription OnCreateDeck {
3 | onCreateDeck {
4 | id
5 | name
6 | cards {
7 | items {
8 | id
9 | question
10 | answer
11 | }
12 | nextToken
13 | }
14 | }
15 | }
16 | subscription OnUpdateDeck {
17 | onUpdateDeck {
18 | id
19 | name
20 | cards {
21 | items {
22 | id
23 | question
24 | answer
25 | }
26 | nextToken
27 | }
28 | }
29 | }
30 | subscription OnDeleteDeck {
31 | onDeleteDeck {
32 | id
33 | name
34 | cards {
35 | items {
36 | id
37 | question
38 | answer
39 | }
40 | nextToken
41 | }
42 | }
43 | }
44 | subscription OnCreateCard {
45 | onCreateCard {
46 | id
47 | question
48 | answer
49 | deck {
50 | id
51 | name
52 | }
53 | }
54 | }
55 | subscription OnUpdateCard {
56 | onUpdateCard {
57 | id
58 | question
59 | answer
60 | deck {
61 | id
62 | name
63 | }
64 | }
65 | }
66 | subscription OnDeleteCard {
67 | onDeleteCard {
68 | id
69 | question
70 | answer
71 | deck {
72 | id
73 | name
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/theme/amplify.scss:
--------------------------------------------------------------------------------
1 | :root {
2 |
3 | /** Angular Theme **/
4 | --component-width-desktop: 460px;
5 | --component-width-mobile: 100%;
6 |
7 | --color-primary: #0bb8cc;
8 | --color-primary-accent: #232F3E;
9 | --color-primary-highlight: #0cd1e8;
10 |
11 | --color-background:#232F3E;
12 |
13 | --color-secondary: #152939;
14 | --color-secondary-accent: #31465F;
15 |
16 | --color-danger: #DD3F5B;
17 | --color-error: #D0021B;
18 |
19 | --color-accent-brown: #828282;
20 | --color-accent-blue: #E1E4EA;
21 |
22 | --gradient-blaze: linear-gradient(270deg, #FFC300 0%, #FF9000 100%);
23 |
24 | --color-blue: #007EB9;
25 | --color-purple: #527FFF;
26 | --color-white: #FFFFFF;
27 |
28 | --input-border: 1px solid #C4C4C4;
29 | --input-padding: 0.5em 0.5em 0.3em 1em;
30 |
31 | --box-shadow: 1px 1px 4px 0 rgba(0,0,0,0.15);
32 | --button-height: 42px;
33 |
34 | --interactions-conversation-height: 250px;
35 |
36 | /* Ionic Theme */
37 |
38 | /** primary **/
39 | --ion-color-primary: #0cd1e8;
40 | --ion-color-primary-rgb: 12,209,232;
41 | --ion-color-primary-contrast: #ffffff;
42 | --ion-color-primary-contrast-rgb: 255,255,255;
43 | --ion-color-primary-shade: #0bb8cc;
44 | --ion-color-primary-tint: #24d6ea;
45 | }
46 |
--------------------------------------------------------------------------------
/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 | import { RouteReuseStrategy } from '@angular/router';
4 |
5 | import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
6 | import { SplashScreen } from '@ionic-native/splash-screen/ngx';
7 | import { StatusBar } from '@ionic-native/status-bar/ngx';
8 |
9 | import { AppComponent } from './app.component';
10 | import { AppRoutingModule } from './app-routing.module';
11 |
12 | import { QuizPage } from './quiz/quiz.page';
13 | import { QuizPageModule } from './quiz/quiz.module';
14 | import { CardDetailsPage } from './card-details/card-details.page';
15 | import { CardDetailsPageModule } from './card-details/card-details.module';
16 | import { AmplifyAngularModule, AmplifyIonicModule, AmplifyService } from 'aws-amplify-angular'
17 |
18 | @NgModule({
19 | declarations: [AppComponent],
20 | entryComponents: [QuizPage, CardDetailsPage],
21 | imports: [
22 | BrowserModule,
23 | IonicModule.forRoot(),
24 | AppRoutingModule,
25 | QuizPageModule,
26 | CardDetailsPageModule,
27 | AmplifyAngularModule,
28 | AmplifyIonicModule
29 | ],
30 | providers: [
31 | StatusBar,
32 | SplashScreen,
33 | { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
34 | AmplifyService
35 | ],
36 | bootstrap: [AppComponent]
37 | })
38 | export class AppModule {}
39 |
--------------------------------------------------------------------------------
/src/graphql/mutations.graphql:
--------------------------------------------------------------------------------
1 | # this is an auto generated file. This will be overwritten
2 | mutation CreateDeck($input: CreateDeckInput!) {
3 | createDeck(input: $input) {
4 | id
5 | name
6 | cards {
7 | items {
8 | id
9 | question
10 | answer
11 | }
12 | nextToken
13 | }
14 | }
15 | }
16 | mutation UpdateDeck($input: UpdateDeckInput!) {
17 | updateDeck(input: $input) {
18 | id
19 | name
20 | cards {
21 | items {
22 | id
23 | question
24 | answer
25 | }
26 | nextToken
27 | }
28 | }
29 | }
30 | mutation DeleteDeck($input: DeleteDeckInput!) {
31 | deleteDeck(input: $input) {
32 | id
33 | name
34 | cards {
35 | items {
36 | id
37 | question
38 | answer
39 | }
40 | nextToken
41 | }
42 | }
43 | }
44 | mutation CreateCard($input: CreateCardInput!) {
45 | createCard(input: $input) {
46 | id
47 | question
48 | answer
49 | deck {
50 | id
51 | name
52 | }
53 | }
54 | }
55 | mutation UpdateCard($input: UpdateCardInput!) {
56 | updateCard(input: $input) {
57 | id
58 | question
59 | answer
60 | deck {
61 | id
62 | name
63 | }
64 | }
65 | }
66 | mutation DeleteCard($input: DeleteCardInput!) {
67 | deleteCard(input: $input) {
68 | id
69 | question
70 | answer
71 | deck {
72 | id
73 | name
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/graphql/queries.graphql:
--------------------------------------------------------------------------------
1 | # this is an auto generated file. This will be overwritten
2 | query GetDeck($id: ID!) {
3 | getDeck(id: $id) {
4 | id
5 | name
6 | cards {
7 | items {
8 | id
9 | question
10 | answer
11 | }
12 | nextToken
13 | }
14 | }
15 | }
16 | query ListDecks(
17 | $filter: ModelDeckFilterInput
18 | $limit: Int
19 | $nextToken: String
20 | ) {
21 | listDecks(filter: $filter, limit: $limit, nextToken: $nextToken) {
22 | items {
23 | id
24 | name
25 | cards {
26 | items {
27 | id
28 | question
29 | answer
30 | }
31 | nextToken
32 | }
33 | }
34 | nextToken
35 | }
36 | }
37 | query GetCard($id: ID!) {
38 | getCard(id: $id) {
39 | id
40 | question
41 | answer
42 | deck {
43 | id
44 | name
45 | }
46 | }
47 | }
48 | query ListCards(
49 | $filter: ModelCardFilterInput
50 | $limit: Int
51 | $nextToken: String
52 | ) {
53 | listCards(filter: $filter, limit: $limit, nextToken: $nextToken) {
54 | items {
55 | id
56 | question
57 | answer
58 | deck {
59 | id
60 | name
61 | }
62 | }
63 | nextToken
64 | }
65 | }
66 | query SearchCards(
67 | $filter: SearchableCardFilterInput
68 | $sort: SearchableCardSortInput
69 | $limit: Int
70 | $nextToken: Int
71 | ) {
72 | searchCards(
73 | filter: $filter
74 | sort: $sort
75 | limit: $limit
76 | nextToken: $nextToken
77 | ) {
78 | items {
79 | id
80 | question
81 | answer
82 | deck {
83 | id
84 | name
85 | }
86 | }
87 | nextToken
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2 | import { TestBed, async } from '@angular/core/testing';
3 |
4 | import { Platform } from '@ionic/angular';
5 | import { SplashScreen } from '@ionic-native/splash-screen/ngx';
6 | import { StatusBar } from '@ionic-native/status-bar/ngx';
7 |
8 | import { AppComponent } from './app.component';
9 |
10 | describe('AppComponent', () => {
11 |
12 | let statusBarSpy, splashScreenSpy, platformReadySpy, platformSpy;
13 |
14 | beforeEach(async(() => {
15 | statusBarSpy = jasmine.createSpyObj('StatusBar', ['styleDefault']);
16 | splashScreenSpy = jasmine.createSpyObj('SplashScreen', ['hide']);
17 | platformReadySpy = Promise.resolve();
18 | platformSpy = jasmine.createSpyObj('Platform', { ready: platformReadySpy });
19 |
20 | TestBed.configureTestingModule({
21 | declarations: [AppComponent],
22 | schemas: [CUSTOM_ELEMENTS_SCHEMA],
23 | providers: [
24 | { provide: StatusBar, useValue: statusBarSpy },
25 | { provide: SplashScreen, useValue: splashScreenSpy },
26 | { provide: Platform, useValue: platformSpy },
27 | ],
28 | }).compileComponents();
29 | }));
30 |
31 | it('should create the app', () => {
32 | const fixture = TestBed.createComponent(AppComponent);
33 | const app = fixture.debugElement.componentInstance;
34 | expect(app).toBeTruthy();
35 | });
36 |
37 | it('should initialize the app', async () => {
38 | TestBed.createComponent(AppComponent);
39 | expect(platformSpy.ready).toHaveBeenCalled();
40 | await platformReadySpy;
41 | expect(statusBarSpy.styleDefault).toHaveBeenCalled();
42 | expect(splashScreenSpy.hide).toHaveBeenCalled();
43 | });
44 |
45 | // TODO: add more tests!
46 |
47 | });
48 |
--------------------------------------------------------------------------------
/src/app/cards/cards.page.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { ActivatedRoute } from '@angular/router';
3 | import { ModalController } from '@ionic/angular';
4 | import { CardDetailsPage } from '../card-details/card-details.page';
5 | import { API, graphqlOperation } from "aws-amplify";
6 |
7 | const listQuestions = `
8 | query listQuestions($id: ID!) {
9 | getDeck(id: $id) {
10 | name
11 | cards {
12 | items {
13 | id
14 | question
15 | }
16 | }
17 | }
18 | }
19 | `;
20 |
21 | @Component({
22 | selector: 'app-cards',
23 | templateUrl: './cards.page.html',
24 | styleUrls: ['./cards.page.scss'],
25 | })
26 | export class CardsPage implements OnInit {
27 |
28 | public deckId;
29 | public deck;
30 |
31 | constructor(private modalController: ModalController,
32 | private route: ActivatedRoute) {
33 | }
34 |
35 | ngOnInit() {
36 | this.route.params.subscribe(p => {
37 | this.deckId = p.id;
38 | this.getQuestions();
39 | });
40 | }
41 |
42 | getQuestions() {
43 | const query = API.graphql(graphqlOperation(listQuestions, { id: this.deckId })) as Promise;
44 |
45 | query.then(res => {
46 | this.deck = res.data.getDeck;
47 | });
48 | }
49 |
50 | async showCard(card) {
51 | return this.loadModal(card);
52 | }
53 |
54 | async showNewCard() {
55 | return this.loadModal(null);
56 | }
57 |
58 | async loadModal(card) {
59 | const modal = await this.modalController.create({
60 | component: CardDetailsPage,
61 | componentProps: {
62 | card: card,
63 | deck: { id: this.deckId }
64 | }
65 | });
66 |
67 | modal.onDidDismiss().then(() => this.getQuestions());
68 |
69 | return await modal.present();
70 | }
71 | }
--------------------------------------------------------------------------------
/src/app/card-details/card-details.page.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { ModalController, NavParams } from '@ionic/angular';
3 | import { API, graphqlOperation } from "aws-amplify";
4 | import { APIService } from '../api.service';
5 |
6 | const getAnswer = `
7 | query getAnswer($id: ID!) {
8 | getCard(id: $id) {
9 | answer
10 | }
11 | }
12 | `;
13 |
14 | @Component({
15 | selector: 'app-card-details',
16 | templateUrl: './card-details.page.html',
17 | styleUrls: ['./card-details.page.scss'],
18 | })
19 | export class CardDetailsPage implements OnInit {
20 |
21 | public card;
22 | public deck;
23 | public isNew = false;
24 |
25 | constructor(private modalController: ModalController,
26 | private navParams: NavParams,
27 | private apiService: APIService) { }
28 |
29 | ngOnInit() {
30 | this.deck = this.navParams.get('deck');
31 | const card = this.navParams.get('card');
32 |
33 | if (!card) {
34 | this.isNew = true;
35 | this.card = {};
36 | }
37 | else {
38 | this.card = Object.assign({}, card);
39 |
40 | const query = API.graphql(graphqlOperation(getAnswer, { id: this.card.id })) as Promise;
41 |
42 | query.then(res => {
43 | this.card.answer = res.data.getCard.answer;
44 | });
45 | }
46 | }
47 |
48 | delete() {
49 | if (!this.isNew) {
50 | this.apiService.DeleteCard({
51 | id: this.card.id
52 | });
53 | }
54 |
55 | this.modalController.dismiss();
56 | }
57 |
58 | save() {
59 | if (this.isNew) {
60 | this.apiService.CreateCard({
61 | cardDeckId: this.deck.id,
62 | question: this.card.question,
63 | answer: this.card.answer
64 | })
65 | }
66 | else {
67 | this.apiService.UpdateCard({
68 | id: this.card.id,
69 | question: this.card.question,
70 | answer: this.card.answer
71 | })
72 | }
73 |
74 | this.modalController.dismiss();
75 | }
76 | }
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "quiz-app",
3 | "version": "0.0.1",
4 | "author": "Ionic Framework",
5 | "homepage": "http://ionicframework.com/",
6 | "scripts": {
7 | "ng": "ng",
8 | "start": "ng serve",
9 | "build": "ng build",
10 | "test": "ng test",
11 | "lint": "ng lint",
12 | "e2e": "ng e2e"
13 | },
14 | "private": true,
15 | "dependencies": {
16 | "@angular/common": "~6.1.1",
17 | "@angular/core": "~6.1.1",
18 | "@angular/forms": "~6.1.1",
19 | "@angular/http": "~6.1.1",
20 | "@angular/platform-browser": "~6.1.1",
21 | "@angular/platform-browser-dynamic": "~6.1.1",
22 | "@angular/router": "~6.1.1",
23 | "@aws-amplify/ui": "^1.0.9",
24 | "@ionic-native/core": "5.0.0-beta.21",
25 | "@ionic-native/splash-screen": "5.0.0-beta.21",
26 | "@ionic-native/status-bar": "5.0.0-beta.21",
27 | "@ionic/angular": "4.0.0-beta.15",
28 | "aws-amplify": "^1.1.10",
29 | "aws-amplify-angular": "^2.0.13",
30 | "core-js": "^2.5.3",
31 | "rxjs": "6.2.2",
32 | "zone.js": "^0.8.26"
33 | },
34 | "devDependencies": {
35 | "@angular-devkit/architect": "~0.8.5",
36 | "@angular-devkit/build-angular": "~0.8.5",
37 | "@angular-devkit/core": "~0.8.5",
38 | "@angular-devkit/schematics": "~0.8.5",
39 | "@angular/cli": "~6.2.5",
40 | "@angular/compiler": "~6.1.1",
41 | "@angular/compiler-cli": "~6.1.1",
42 | "@angular/language-service": "~6.1.1",
43 | "@ionic/angular-toolkit": "^1.0.0",
44 | "@ionic/lab": "1.0.13",
45 | "@types/jasmine": "~2.8.6",
46 | "@types/jasminewd2": "~2.0.3",
47 | "@types/node": "~10.12.0",
48 | "codelyzer": "~4.5.0",
49 | "jasmine-core": "~2.99.1",
50 | "jasmine-spec-reporter": "~4.2.1",
51 | "karma": "~3.0.0",
52 | "karma-chrome-launcher": "~2.2.0",
53 | "karma-coverage-istanbul-reporter": "~2.0.0",
54 | "karma-jasmine": "~1.1.1",
55 | "karma-jasmine-html-reporter": "^0.2.2",
56 | "protractor": "~5.4.0",
57 | "ts-node": "~7.0.0",
58 | "tslint": "~5.11.0",
59 | "typescript": "~2.9.2"
60 | },
61 | "description": "An Ionic project"
62 | }
63 |
--------------------------------------------------------------------------------
/src/app/home/home.page.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { ModalController, AlertController } from '@ionic/angular';
3 | import { Router } from '@angular/router';
4 | import { QuizPage } from '../quiz/quiz.page';
5 |
6 | import { API, graphqlOperation } from "aws-amplify";
7 |
8 | const listDeckNames = `
9 | query listDeckNames {
10 | listDecks {
11 | items {
12 | id
13 | name
14 | }
15 | }
16 | }
17 | `;
18 |
19 | @Component({
20 | selector: 'app-home',
21 | templateUrl: 'home.page.html',
22 | styleUrls: ['home.page.scss'],
23 | })
24 | export class HomePage {
25 |
26 | public decks;
27 |
28 | constructor(private modalController: ModalController,
29 | private router: Router,
30 | private alertController: AlertController) {
31 | }
32 |
33 | ngOnInit() {
34 | const query = API.graphql(graphqlOperation(listDeckNames)) as Promise;
35 |
36 | query.then(res => {
37 | this.decks = res.data.listDecks.items;
38 | });
39 | }
40 |
41 | showCards(deck) {
42 | this.router.navigate(['/cards', deck.id]);
43 | }
44 |
45 | async promptQuiz() {
46 | const alert = await this.alertController.create({
47 | header: 'Which cards?',
48 | inputs: [
49 | {
50 | name: 'filter',
51 | type: 'text',
52 | placeholder: 'Type a word to filter the cards'
53 | }
54 | ],
55 | buttons: [
56 | {
57 | text: 'Cancel',
58 | role: 'cancel',
59 | cssClass: 'secondary',
60 | handler: () => {
61 | console.log('Confirm Cancel');
62 | }
63 | },
64 | {
65 | text: 'Start Quiz',
66 | handler: async data => {
67 | console.log(data.filter);
68 | await this.startQuiz(data.filter);
69 | }
70 | }
71 | ]
72 | });
73 |
74 | await alert.present();
75 | }
76 |
77 | async startQuiz(filter) {
78 | const modal = await this.modalController.create({
79 | component: QuizPage,
80 | componentProps: { filter }
81 | });
82 | return await modal.present();
83 | }
84 | }
--------------------------------------------------------------------------------
/src/theme/variables.scss:
--------------------------------------------------------------------------------
1 | // Ionic Variables and Theming. For more info, please see:
2 | // http://ionicframework.com/docs/theming/
3 |
4 | /** Ionic CSS Variables **/
5 | :root {
6 |
7 | /** primary **/
8 | --ion-color-primary: #3880ff;
9 | --ion-color-primary-rgb: 56,128,255;
10 | --ion-color-primary-contrast: #ffffff;
11 | --ion-color-primary-contrast-rgb: 255,255,255;
12 | --ion-color-primary-shade: #3171e0;
13 | --ion-color-primary-tint: #4c8dff;
14 |
15 | /** secondary **/
16 | --ion-color-secondary: #0cd1e8;
17 | --ion-color-secondary-rgb: 12,209,232;
18 | --ion-color-secondary-contrast: #ffffff;
19 | --ion-color-secondary-contrast-rgb: 255,255,255;
20 | --ion-color-secondary-shade: #0bb8cc;
21 | --ion-color-secondary-tint: #24d6ea;
22 |
23 | /** tertiary **/
24 | --ion-color-tertiary: #7044ff;
25 | --ion-color-tertiary-rgb: 112,68,255;
26 | --ion-color-tertiary-contrast: #ffffff;
27 | --ion-color-tertiary-contrast-rgb: 255,255,255;
28 | --ion-color-tertiary-shade: #633ce0;
29 | --ion-color-tertiary-tint: #7e57ff;
30 |
31 | /** success **/
32 | --ion-color-success: #10dc60;
33 | --ion-color-success-rgb: 16,220,96;
34 | --ion-color-success-contrast: #ffffff;
35 | --ion-color-success-contrast-rgb: 255,255,255;
36 | --ion-color-success-shade: #0ec254;
37 | --ion-color-success-tint: #28e070;
38 |
39 | /** warning **/
40 | --ion-color-warning: #ffce00;
41 | --ion-color-warning-rgb: 255,206,0;
42 | --ion-color-warning-contrast: #ffffff;
43 | --ion-color-warning-contrast-rgb: 255,255,255;
44 | --ion-color-warning-shade: #e0b500;
45 | --ion-color-warning-tint: #ffd31a;
46 |
47 | /** danger **/
48 | --ion-color-danger: #f04141;
49 | --ion-color-danger-rgb: 245,61,61;
50 | --ion-color-danger-contrast: #ffffff;
51 | --ion-color-danger-contrast-rgb: 255,255,255;
52 | --ion-color-danger-shade: #d33939;
53 | --ion-color-danger-tint: #f25454;
54 |
55 | /** dark **/
56 | --ion-color-dark: #222428;
57 | --ion-color-dark-rgb: 34,34,34;
58 | --ion-color-dark-contrast: #ffffff;
59 | --ion-color-dark-contrast-rgb: 255,255,255;
60 | --ion-color-dark-shade: #1e2023;
61 | --ion-color-dark-tint: #383a3e;
62 |
63 | /** medium **/
64 | --ion-color-medium: #989aa2;
65 | --ion-color-medium-rgb: 152,154,162;
66 | --ion-color-medium-contrast: #ffffff;
67 | --ion-color-medium-contrast-rgb: 255,255,255;
68 | --ion-color-medium-shade: #86888f;
69 | --ion-color-medium-tint: #a2a4ab;
70 |
71 | /** light **/
72 | --ion-color-light: #f4f5f8;
73 | --ion-color-light-rgb: 244,244,244;
74 | --ion-color-light-contrast: #000000;
75 | --ion-color-light-contrast-rgb: 0,0,0;
76 | --ion-color-light-shade: #d7d8da;
77 | --ion-color-light-tint: #f5f6f9;
78 |
79 | --ion-background-color: #0cd1e8;
80 | --ion-item-background: #ffffff;
81 | }
82 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rulesDirectory": [
3 | "node_modules/codelyzer"
4 | ],
5 | "rules": {
6 | "arrow-return-shorthand": true,
7 | "callable-types": true,
8 | "class-name": true,
9 | "comment-format": [
10 | true,
11 | "check-space"
12 | ],
13 | "curly": true,
14 | "deprecation": {
15 | "severity": "warn"
16 | },
17 | "eofline": true,
18 | "forin": true,
19 | "import-spacing": true,
20 | "indent": [
21 | true,
22 | "spaces"
23 | ],
24 | "interface-over-type-literal": true,
25 | "label-position": true,
26 | "max-line-length": [
27 | true,
28 | 140
29 | ],
30 | "member-access": false,
31 | "member-ordering": [
32 | true,
33 | {
34 | "order": [
35 | "static-field",
36 | "instance-field",
37 | "static-method",
38 | "instance-method"
39 | ]
40 | }
41 | ],
42 | "no-arg": true,
43 | "no-bitwise": true,
44 | "no-console": [
45 | true,
46 | "debug",
47 | "info",
48 | "time",
49 | "timeEnd",
50 | "trace"
51 | ],
52 | "no-construct": true,
53 | "no-debugger": true,
54 | "no-duplicate-super": true,
55 | "no-empty": false,
56 | "no-empty-interface": true,
57 | "no-eval": true,
58 | "no-inferrable-types": [
59 | true,
60 | "ignore-params"
61 | ],
62 | "no-misused-new": true,
63 | "no-non-null-assertion": true,
64 | "no-shadowed-variable": true,
65 | "no-string-literal": false,
66 | "no-string-throw": true,
67 | "no-switch-case-fall-through": true,
68 | "no-trailing-whitespace": true,
69 | "no-unnecessary-initializer": true,
70 | "no-unused-expression": true,
71 | "no-use-before-declare": true,
72 | "no-var-keyword": true,
73 | "object-literal-sort-keys": false,
74 | "one-line": [
75 | true,
76 | "check-open-brace",
77 | "check-catch",
78 | "check-else",
79 | "check-whitespace"
80 | ],
81 | "prefer-const": true,
82 | "quotemark": [
83 | true,
84 | "single"
85 | ],
86 | "radix": true,
87 | "semicolon": [
88 | true,
89 | "always"
90 | ],
91 | "triple-equals": [
92 | true,
93 | "allow-null-check"
94 | ],
95 | "typedef-whitespace": [
96 | true,
97 | {
98 | "call-signature": "nospace",
99 | "index-signature": "nospace",
100 | "parameter": "nospace",
101 | "property-declaration": "nospace",
102 | "variable-declaration": "nospace"
103 | }
104 | ],
105 | "unified-signatures": true,
106 | "variable-name": false,
107 | "whitespace": [
108 | true,
109 | "check-branch",
110 | "check-decl",
111 | "check-operator",
112 | "check-separator",
113 | "check-type"
114 | ],
115 | "directive-selector": [
116 | true,
117 | "attribute",
118 | "app",
119 | "camelCase"
120 | ],
121 | "component-selector": [
122 | true,
123 | "element",
124 | "app",
125 | "page",
126 | "kebab-case"
127 | ],
128 | "no-output-on-prefix": true,
129 | "use-input-property-decorator": true,
130 | "use-output-property-decorator": true,
131 | "use-host-property-decorator": true,
132 | "no-input-rename": true,
133 | "no-output-rename": true,
134 | "use-life-cycle-interface": true,
135 | "use-pipe-transform-interface": true,
136 | "directive-class-suffix": true
137 | }
138 | }
139 |
--------------------------------------------------------------------------------
/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * This file includes polyfills needed by Angular and is loaded before the app.
3 | * You can add your own extra polyfills to this file.
4 | *
5 | * This file is divided into 2 sections:
6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8 | * file.
9 | *
10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13 | *
14 | * Learn more in https://angular.io/guide/browser-support
15 | */
16 |
17 | /***************************************************************************************************
18 | * BROWSER POLYFILLS
19 | */
20 |
21 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/
22 | // import 'core-js/es6/symbol';
23 | // import 'core-js/es6/object';
24 | // import 'core-js/es6/function';
25 | // import 'core-js/es6/parse-int';
26 | // import 'core-js/es6/parse-float';
27 | // import 'core-js/es6/number';
28 | // import 'core-js/es6/math';
29 | // import 'core-js/es6/string';
30 | // import 'core-js/es6/date';
31 | // import 'core-js/es6/regexp';
32 | // import 'core-js/es6/map';
33 | // import 'core-js/es6/weak-map';
34 | // import 'core-js/es6/set';
35 |
36 | /**
37 | * If your app need to indexed by Google Search, your app require polyfills 'core-js/es6/array'
38 | * Google bot use ES5.
39 | * FYI: Googlebot uses a renderer following the similar spec to Chrome 41.
40 | * https://developers.google.com/search/docs/guides/rendering
41 | **/
42 | // import 'core-js/es6/array';
43 |
44 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */
45 | // import 'classlist.js'; // Run `npm install --save classlist.js`.
46 |
47 | /** IE10 and IE11 requires the following for the Reflect API. */
48 | // import 'core-js/es6/reflect';
49 |
50 |
51 | /** Evergreen browsers require these. **/
52 | // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
53 | import 'core-js/es7/reflect';
54 |
55 |
56 | /**
57 | * Web Animations `@angular/platform-browser/animations`
58 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
59 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
60 | **/
61 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
62 |
63 | /**
64 | * By default, zone.js will patch all possible macroTask and DomEvents
65 | * user can disable parts of macroTask/DomEvents patch by setting following flags
66 | */
67 |
68 | // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
69 | // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
70 | // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
71 |
72 | /*
73 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
74 | * with the following flag, it will bypass `zone.js` patch for IE/Edge
75 | */
76 | // (window as any).__Zone_enable_cross_context_check = true;
77 |
78 | /***************************************************************************************************
79 | * Zone JS is required by default for Angular itself.
80 | */
81 | import 'zone.js/dist/zone'; // Included with Angular CLI.
82 |
83 |
84 |
85 | /***************************************************************************************************
86 | * APPLICATION IMPORTS
87 | */
88 |
89 | (window as any).global = window;
90 |
91 | (window as any).process = {
92 | env: { DEBUG: undefined },
93 | };
--------------------------------------------------------------------------------
/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
3 | "version": 1,
4 | "defaultProject": "app",
5 | "newProjectRoot": "projects",
6 | "projects": {
7 | "app": {
8 | "root": "",
9 | "sourceRoot": "src",
10 | "projectType": "application",
11 | "prefix": "app",
12 | "schematics": {},
13 | "architect": {
14 | "build": {
15 | "builder": "@angular-devkit/build-angular:browser",
16 | "options": {
17 | "progress": false,
18 | "outputPath": "www",
19 | "index": "src/index.html",
20 | "main": "src/main.ts",
21 | "polyfills": "src/polyfills.ts",
22 | "tsConfig": "src/tsconfig.app.json",
23 | "assets": [
24 | {
25 | "glob": "**/*",
26 | "input": "src/assets",
27 | "output": "assets"
28 | },
29 | {
30 | "glob": "**/*.svg",
31 | "input": "node_modules/@ionic/angular/dist/ionic/svg",
32 | "output": "./svg"
33 | }
34 | ],
35 | "styles": [
36 | {
37 | "input": "src/theme/variables.scss"
38 | },
39 | {
40 | "input": "src/global.scss"
41 | }
42 | ],
43 | "scripts": []
44 | },
45 | "configurations": {
46 | "production": {
47 | "fileReplacements": [
48 | {
49 | "replace": "src/environments/environment.ts",
50 | "with": "src/environments/environment.prod.ts"
51 | }
52 | ],
53 | "optimization": true,
54 | "outputHashing": "all",
55 | "sourceMap": false,
56 | "extractCss": true,
57 | "namedChunks": false,
58 | "aot": true,
59 | "extractLicenses": true,
60 | "vendorChunk": false,
61 | "buildOptimizer": true
62 | }
63 | }
64 | },
65 | "serve": {
66 | "builder": "@angular-devkit/build-angular:dev-server",
67 | "options": {
68 | "browserTarget": "app:build"
69 | },
70 | "configurations": {
71 | "production": {
72 | "browserTarget": "app:build:production"
73 | }
74 | }
75 | },
76 | "extract-i18n": {
77 | "builder": "@angular-devkit/build-angular:extract-i18n",
78 | "options": {
79 | "browserTarget": "app:build"
80 | }
81 | },
82 | "test": {
83 | "builder": "@angular-devkit/build-angular:karma",
84 | "options": {
85 | "main": "src/test.ts",
86 | "polyfills": "src/polyfills.ts",
87 | "tsConfig": "src/tsconfig.spec.json",
88 | "karmaConfig": "src/karma.conf.js",
89 | "styles": [],
90 | "scripts": [],
91 | "assets": [
92 | {
93 | "glob": "favicon.ico",
94 | "input": "src/",
95 | "output": "/"
96 | },
97 | {
98 | "glob": "**/*",
99 | "input": "src/assets",
100 | "output": "/assets"
101 | }
102 | ]
103 | }
104 | },
105 | "lint": {
106 | "builder": "@angular-devkit/build-angular:tslint",
107 | "options": {
108 | "tsConfig": [
109 | "src/tsconfig.app.json",
110 | "src/tsconfig.spec.json"
111 | ],
112 | "exclude": [
113 | "**/node_modules/**"
114 | ]
115 | }
116 | },
117 | "ionic-cordova-build": {
118 | "builder": "@ionic/angular-toolkit:cordova-build",
119 | "options": {
120 | "browserTarget": "app:build"
121 | },
122 | "configurations": {
123 | "production": {
124 | "browserTarget": "app:build:production"
125 | }
126 | }
127 | },
128 | "ionic-cordova-serve": {
129 | "builder": "@ionic/angular-toolkit:cordova-serve",
130 | "options": {
131 | "cordovaBuildTarget": "app:ionic-cordova-build",
132 | "devServerTarget": "app:serve"
133 | },
134 | "configurations": {
135 | "production": {
136 | "cordovaBuildTarget": "app:ionic-cordova-build:production",
137 | "devServerTarget": "app:serve:production"
138 | }
139 | }
140 | }
141 | }
142 | },
143 | "app-e2e": {
144 | "root": "e2e/",
145 | "projectType": "application",
146 | "architect": {
147 | "e2e": {
148 | "builder": "@angular-devkit/build-angular:protractor",
149 | "options": {
150 | "protractorConfig": "e2e/protractor.conf.js",
151 | "devServerTarget": "app:serve"
152 | }
153 | },
154 | "lint": {
155 | "builder": "@angular-devkit/build-angular:tslint",
156 | "options": {
157 | "tsConfig": "e2e/tsconfig.e2e.json",
158 | "exclude": [
159 | "**/node_modules/**"
160 | ]
161 | }
162 | }
163 | }
164 | }
165 | },
166 | "cli": {
167 | "defaultCollection": "@ionic/angular-toolkit"
168 | },
169 | "schematics": {
170 | "@ionic/angular-toolkit:component": {
171 | "styleext": "scss"
172 | },
173 | "@ionic/angular-toolkit:page": {
174 | "styleext": "scss"
175 | }
176 | }
177 | }
178 |
--------------------------------------------------------------------------------
/src/app/api.service.ts:
--------------------------------------------------------------------------------
1 | /* tslint:disable */
2 | // This file was automatically generated and should not be edited.
3 | import { Injectable } from "@angular/core";
4 | import API, { graphqlOperation } from "@aws-amplify/api";
5 | import { GraphQLResult } from "@aws-amplify/api/lib/types";
6 | import * as Observable from "zen-observable";
7 |
8 | export type CreateDeckInput = {
9 | id?: string | null;
10 | name: string;
11 | };
12 |
13 | export type UpdateDeckInput = {
14 | id: string;
15 | name?: string | null;
16 | };
17 |
18 | export type DeleteDeckInput = {
19 | id?: string | null;
20 | };
21 |
22 | export type CreateCardInput = {
23 | id?: string | null;
24 | question: string;
25 | answer?: string | null;
26 | cardDeckId: string;
27 | };
28 |
29 | export type UpdateCardInput = {
30 | id: string;
31 | question?: string | null;
32 | answer?: string | null;
33 | cardDeckId?: string | null;
34 | };
35 |
36 | export type DeleteCardInput = {
37 | id?: string | null;
38 | };
39 |
40 | export type ModelDeckFilterInput = {
41 | id?: ModelIDFilterInput | null;
42 | name?: ModelStringFilterInput | null;
43 | and?: Array | null;
44 | or?: Array | null;
45 | not?: ModelDeckFilterInput | null;
46 | };
47 |
48 | export type ModelIDFilterInput = {
49 | ne?: string | null;
50 | eq?: string | null;
51 | le?: string | null;
52 | lt?: string | null;
53 | ge?: string | null;
54 | gt?: string | null;
55 | contains?: string | null;
56 | notContains?: string | null;
57 | between?: Array | null;
58 | beginsWith?: string | null;
59 | };
60 |
61 | export type ModelStringFilterInput = {
62 | ne?: string | null;
63 | eq?: string | null;
64 | le?: string | null;
65 | lt?: string | null;
66 | ge?: string | null;
67 | gt?: string | null;
68 | contains?: string | null;
69 | notContains?: string | null;
70 | between?: Array | null;
71 | beginsWith?: string | null;
72 | };
73 |
74 | export type ModelCardFilterInput = {
75 | id?: ModelIDFilterInput | null;
76 | question?: ModelStringFilterInput | null;
77 | answer?: ModelStringFilterInput | null;
78 | and?: Array | null;
79 | or?: Array | null;
80 | not?: ModelCardFilterInput | null;
81 | };
82 |
83 | export type SearchableCardFilterInput = {
84 | id?: SearchableIDFilterInput | null;
85 | question?: SearchableStringFilterInput | null;
86 | answer?: SearchableStringFilterInput | null;
87 | and?: Array | null;
88 | or?: Array | null;
89 | not?: SearchableCardFilterInput | null;
90 | };
91 |
92 | export type SearchableIDFilterInput = {
93 | ne?: string | null;
94 | eq?: string | null;
95 | match?: string | null;
96 | matchPhrase?: string | null;
97 | matchPhrasePrefix?: string | null;
98 | multiMatch?: string | null;
99 | exists?: boolean | null;
100 | wildcard?: string | null;
101 | regexp?: string | null;
102 | };
103 |
104 | export type SearchableStringFilterInput = {
105 | ne?: string | null;
106 | eq?: string | null;
107 | match?: string | null;
108 | matchPhrase?: string | null;
109 | matchPhrasePrefix?: string | null;
110 | multiMatch?: string | null;
111 | exists?: boolean | null;
112 | wildcard?: string | null;
113 | regexp?: string | null;
114 | };
115 |
116 | export type SearchableCardSortInput = {
117 | field?: SearchableCardSortableFields | null;
118 | direction?: SearchableSortDirection | null;
119 | };
120 |
121 | export enum SearchableCardSortableFields {
122 | id = "id",
123 | question = "question",
124 | answer = "answer"
125 | }
126 |
127 | export enum SearchableSortDirection {
128 | asc = "asc",
129 | desc = "desc"
130 | }
131 |
132 | export type CreateDeckMutation = {
133 | id: string;
134 | name: string;
135 | cards: {
136 | items: Array<{
137 | id: string;
138 | question: string;
139 | answer: string | null;
140 | } | null> | null;
141 | nextToken: string | null;
142 | } | null;
143 | };
144 |
145 | export type UpdateDeckMutation = {
146 | id: string;
147 | name: string;
148 | cards: {
149 | items: Array<{
150 | id: string;
151 | question: string;
152 | answer: string | null;
153 | } | null> | null;
154 | nextToken: string | null;
155 | } | null;
156 | };
157 |
158 | export type DeleteDeckMutation = {
159 | id: string;
160 | name: string;
161 | cards: {
162 | items: Array<{
163 | id: string;
164 | question: string;
165 | answer: string | null;
166 | } | null> | null;
167 | nextToken: string | null;
168 | } | null;
169 | };
170 |
171 | export type CreateCardMutation = {
172 | id: string;
173 | question: string;
174 | answer: string | null;
175 | deck: {
176 | id: string;
177 | name: string;
178 | };
179 | };
180 |
181 | export type UpdateCardMutation = {
182 | id: string;
183 | question: string;
184 | answer: string | null;
185 | deck: {
186 | id: string;
187 | name: string;
188 | };
189 | };
190 |
191 | export type DeleteCardMutation = {
192 | id: string;
193 | question: string;
194 | answer: string | null;
195 | deck: {
196 | id: string;
197 | name: string;
198 | };
199 | };
200 |
201 | export type GetDeckQuery = {
202 | id: string;
203 | name: string;
204 | cards: {
205 | items: Array<{
206 | id: string;
207 | question: string;
208 | answer: string | null;
209 | } | null> | null;
210 | nextToken: string | null;
211 | } | null;
212 | };
213 |
214 | export type ListDecksQuery = {
215 | items: Array<{
216 | id: string;
217 | name: string;
218 | cards: {
219 | items: Array<{
220 | id: string;
221 | question: string;
222 | answer: string | null;
223 | } | null> | null;
224 | nextToken: string | null;
225 | } | null;
226 | } | null> | null;
227 | nextToken: string | null;
228 | };
229 |
230 | export type GetCardQuery = {
231 | id: string;
232 | question: string;
233 | answer: string | null;
234 | deck: {
235 | id: string;
236 | name: string;
237 | };
238 | };
239 |
240 | export type ListCardsQuery = {
241 | items: Array<{
242 | id: string;
243 | question: string;
244 | answer: string | null;
245 | deck: {
246 | id: string;
247 | name: string;
248 | };
249 | } | null> | null;
250 | nextToken: string | null;
251 | };
252 |
253 | export type SearchCardsQuery = {
254 | items: Array<{
255 | id: string;
256 | question: string;
257 | answer: string | null;
258 | deck: {
259 | id: string;
260 | name: string;
261 | };
262 | } | null> | null;
263 | nextToken: string | null;
264 | };
265 |
266 | export type OnCreateDeckSubscription = {
267 | id: string;
268 | name: string;
269 | cards: {
270 | items: Array<{
271 | id: string;
272 | question: string;
273 | answer: string | null;
274 | } | null> | null;
275 | nextToken: string | null;
276 | } | null;
277 | };
278 |
279 | export type OnUpdateDeckSubscription = {
280 | id: string;
281 | name: string;
282 | cards: {
283 | items: Array<{
284 | id: string;
285 | question: string;
286 | answer: string | null;
287 | } | null> | null;
288 | nextToken: string | null;
289 | } | null;
290 | };
291 |
292 | export type OnDeleteDeckSubscription = {
293 | id: string;
294 | name: string;
295 | cards: {
296 | items: Array<{
297 | id: string;
298 | question: string;
299 | answer: string | null;
300 | } | null> | null;
301 | nextToken: string | null;
302 | } | null;
303 | };
304 |
305 | export type OnCreateCardSubscription = {
306 | id: string;
307 | question: string;
308 | answer: string | null;
309 | deck: {
310 | id: string;
311 | name: string;
312 | };
313 | };
314 |
315 | export type OnUpdateCardSubscription = {
316 | id: string;
317 | question: string;
318 | answer: string | null;
319 | deck: {
320 | id: string;
321 | name: string;
322 | };
323 | };
324 |
325 | export type OnDeleteCardSubscription = {
326 | id: string;
327 | question: string;
328 | answer: string | null;
329 | deck: {
330 | id: string;
331 | name: string;
332 | };
333 | };
334 |
335 | @Injectable({
336 | providedIn: "root"
337 | })
338 | export class APIService {
339 | async CreateDeck(input: CreateDeckInput): Promise {
340 | const statement = `mutation CreateDeck($input: CreateDeckInput!) {
341 | createDeck(input: $input) {
342 | id
343 | name
344 | cards {
345 | items {
346 | id
347 | question
348 | answer
349 | }
350 | nextToken
351 | }
352 | }
353 | }`;
354 | const gqlAPIServiceArguments: any = {
355 | input
356 | };
357 | const response = (await API.graphql(
358 | graphqlOperation(statement, gqlAPIServiceArguments)
359 | )) as any;
360 | return response.data.createDeck;
361 | }
362 | async UpdateDeck(input: UpdateDeckInput): Promise {
363 | const statement = `mutation UpdateDeck($input: UpdateDeckInput!) {
364 | updateDeck(input: $input) {
365 | id
366 | name
367 | cards {
368 | items {
369 | id
370 | question
371 | answer
372 | }
373 | nextToken
374 | }
375 | }
376 | }`;
377 | const gqlAPIServiceArguments: any = {
378 | input
379 | };
380 | const response = (await API.graphql(
381 | graphqlOperation(statement, gqlAPIServiceArguments)
382 | )) as any;
383 | return response.data.updateDeck;
384 | }
385 | async DeleteDeck(input: DeleteDeckInput): Promise {
386 | const statement = `mutation DeleteDeck($input: DeleteDeckInput!) {
387 | deleteDeck(input: $input) {
388 | id
389 | name
390 | cards {
391 | items {
392 | id
393 | question
394 | answer
395 | }
396 | nextToken
397 | }
398 | }
399 | }`;
400 | const gqlAPIServiceArguments: any = {
401 | input
402 | };
403 | const response = (await API.graphql(
404 | graphqlOperation(statement, gqlAPIServiceArguments)
405 | )) as any;
406 | return response.data.deleteDeck;
407 | }
408 | async CreateCard(input: CreateCardInput): Promise {
409 | const statement = `mutation CreateCard($input: CreateCardInput!) {
410 | createCard(input: $input) {
411 | id
412 | question
413 | answer
414 | deck {
415 | id
416 | name
417 | }
418 | }
419 | }`;
420 | const gqlAPIServiceArguments: any = {
421 | input
422 | };
423 | const response = (await API.graphql(
424 | graphqlOperation(statement, gqlAPIServiceArguments)
425 | )) as any;
426 | return response.data.createCard;
427 | }
428 | async UpdateCard(input: UpdateCardInput): Promise {
429 | const statement = `mutation UpdateCard($input: UpdateCardInput!) {
430 | updateCard(input: $input) {
431 | id
432 | question
433 | answer
434 | deck {
435 | id
436 | name
437 | }
438 | }
439 | }`;
440 | const gqlAPIServiceArguments: any = {
441 | input
442 | };
443 | const response = (await API.graphql(
444 | graphqlOperation(statement, gqlAPIServiceArguments)
445 | )) as any;
446 | return response.data.updateCard;
447 | }
448 | async DeleteCard(input: DeleteCardInput): Promise {
449 | const statement = `mutation DeleteCard($input: DeleteCardInput!) {
450 | deleteCard(input: $input) {
451 | id
452 | question
453 | answer
454 | deck {
455 | id
456 | name
457 | }
458 | }
459 | }`;
460 | const gqlAPIServiceArguments: any = {
461 | input
462 | };
463 | const response = (await API.graphql(
464 | graphqlOperation(statement, gqlAPIServiceArguments)
465 | )) as any;
466 | return response.data.deleteCard;
467 | }
468 | async GetDeck(id: string): Promise {
469 | const statement = `query GetDeck($id: ID!) {
470 | getDeck(id: $id) {
471 | id
472 | name
473 | cards {
474 | items {
475 | id
476 | question
477 | answer
478 | }
479 | nextToken
480 | }
481 | }
482 | }`;
483 | const gqlAPIServiceArguments: any = {
484 | id
485 | };
486 | const response = (await API.graphql(
487 | graphqlOperation(statement, gqlAPIServiceArguments)
488 | )) as any;
489 | return response.data.getDeck;
490 | }
491 | async ListDecks(
492 | filter?: ModelDeckFilterInput,
493 | limit?: number,
494 | nextToken?: string
495 | ): Promise {
496 | const statement = `query ListDecks($filter: ModelDeckFilterInput, $limit: Int, $nextToken: String) {
497 | listDecks(filter: $filter, limit: $limit, nextToken: $nextToken) {
498 | items {
499 | id
500 | name
501 | cards {
502 | items {
503 | id
504 | question
505 | answer
506 | }
507 | nextToken
508 | }
509 | }
510 | nextToken
511 | }
512 | }`;
513 | const gqlAPIServiceArguments: any = {};
514 | if (filter) {
515 | gqlAPIServiceArguments.filter = filter;
516 | }
517 | if (limit) {
518 | gqlAPIServiceArguments.limit = limit;
519 | }
520 | if (nextToken) {
521 | gqlAPIServiceArguments.nextToken = nextToken;
522 | }
523 | const response = (await API.graphql(
524 | graphqlOperation(statement, gqlAPIServiceArguments)
525 | )) as any;
526 | return response.data.listDecks;
527 | }
528 | async GetCard(id: string): Promise {
529 | const statement = `query GetCard($id: ID!) {
530 | getCard(id: $id) {
531 | id
532 | question
533 | answer
534 | deck {
535 | id
536 | name
537 | }
538 | }
539 | }`;
540 | const gqlAPIServiceArguments: any = {
541 | id
542 | };
543 | const response = (await API.graphql(
544 | graphqlOperation(statement, gqlAPIServiceArguments)
545 | )) as any;
546 | return response.data.getCard;
547 | }
548 | async ListCards(
549 | filter?: ModelCardFilterInput,
550 | limit?: number,
551 | nextToken?: string
552 | ): Promise {
553 | const statement = `query ListCards($filter: ModelCardFilterInput, $limit: Int, $nextToken: String) {
554 | listCards(filter: $filter, limit: $limit, nextToken: $nextToken) {
555 | items {
556 | id
557 | question
558 | answer
559 | deck {
560 | id
561 | name
562 | }
563 | }
564 | nextToken
565 | }
566 | }`;
567 | const gqlAPIServiceArguments: any = {};
568 | if (filter) {
569 | gqlAPIServiceArguments.filter = filter;
570 | }
571 | if (limit) {
572 | gqlAPIServiceArguments.limit = limit;
573 | }
574 | if (nextToken) {
575 | gqlAPIServiceArguments.nextToken = nextToken;
576 | }
577 | const response = (await API.graphql(
578 | graphqlOperation(statement, gqlAPIServiceArguments)
579 | )) as any;
580 | return response.data.listCards;
581 | }
582 | async SearchCards(
583 | filter?: SearchableCardFilterInput,
584 | sort?: SearchableCardSortInput,
585 | limit?: number,
586 | nextToken?: number
587 | ): Promise {
588 | const statement = `query SearchCards($filter: SearchableCardFilterInput, $sort: SearchableCardSortInput, $limit: Int, $nextToken: Int) {
589 | searchCards(filter: $filter, sort: $sort, limit: $limit, nextToken: $nextToken) {
590 | items {
591 | id
592 | question
593 | answer
594 | deck {
595 | id
596 | name
597 | }
598 | }
599 | nextToken
600 | }
601 | }`;
602 | const gqlAPIServiceArguments: any = {};
603 | if (filter) {
604 | gqlAPIServiceArguments.filter = filter;
605 | }
606 | if (sort) {
607 | gqlAPIServiceArguments.sort = sort;
608 | }
609 | if (limit) {
610 | gqlAPIServiceArguments.limit = limit;
611 | }
612 | if (nextToken) {
613 | gqlAPIServiceArguments.nextToken = nextToken;
614 | }
615 | const response = (await API.graphql(
616 | graphqlOperation(statement, gqlAPIServiceArguments)
617 | )) as any;
618 | return response.data.searchCards;
619 | }
620 | OnCreateDeckListener: Observable = API.graphql(
621 | graphqlOperation(
622 | `subscription OnCreateDeck {
623 | onCreateDeck {
624 | id
625 | name
626 | cards {
627 | items {
628 | id
629 | question
630 | answer
631 | }
632 | nextToken
633 | }
634 | }
635 | }`
636 | )
637 | ) as Observable;
638 |
639 | OnUpdateDeckListener: Observable = API.graphql(
640 | graphqlOperation(
641 | `subscription OnUpdateDeck {
642 | onUpdateDeck {
643 | id
644 | name
645 | cards {
646 | items {
647 | id
648 | question
649 | answer
650 | }
651 | nextToken
652 | }
653 | }
654 | }`
655 | )
656 | ) as Observable;
657 |
658 | OnDeleteDeckListener: Observable = API.graphql(
659 | graphqlOperation(
660 | `subscription OnDeleteDeck {
661 | onDeleteDeck {
662 | id
663 | name
664 | cards {
665 | items {
666 | id
667 | question
668 | answer
669 | }
670 | nextToken
671 | }
672 | }
673 | }`
674 | )
675 | ) as Observable;
676 |
677 | OnCreateCardListener: Observable = API.graphql(
678 | graphqlOperation(
679 | `subscription OnCreateCard {
680 | onCreateCard {
681 | id
682 | question
683 | answer
684 | deck {
685 | id
686 | name
687 | }
688 | }
689 | }`
690 | )
691 | ) as Observable;
692 |
693 | OnUpdateCardListener: Observable = API.graphql(
694 | graphqlOperation(
695 | `subscription OnUpdateCard {
696 | onUpdateCard {
697 | id
698 | question
699 | answer
700 | deck {
701 | id
702 | name
703 | }
704 | }
705 | }`
706 | )
707 | ) as Observable;
708 |
709 | OnDeleteCardListener: Observable = API.graphql(
710 | graphqlOperation(
711 | `subscription OnDeleteCard {
712 | onDeleteCard {
713 | id
714 | question
715 | answer
716 | deck {
717 | id
718 | name
719 | }
720 | }
721 | }`
722 | )
723 | ) as Observable;
724 | }
725 |
--------------------------------------------------------------------------------
/src/graphql/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "data" : {
3 | "__schema" : {
4 | "queryType" : {
5 | "name" : "Query"
6 | },
7 | "mutationType" : {
8 | "name" : "Mutation"
9 | },
10 | "subscriptionType" : {
11 | "name" : "Subscription"
12 | },
13 | "types" : [ {
14 | "kind" : "OBJECT",
15 | "name" : "Query",
16 | "description" : null,
17 | "fields" : [ {
18 | "name" : "getDeck",
19 | "description" : null,
20 | "args" : [ {
21 | "name" : "id",
22 | "description" : null,
23 | "type" : {
24 | "kind" : "NON_NULL",
25 | "name" : null,
26 | "ofType" : {
27 | "kind" : "SCALAR",
28 | "name" : "ID",
29 | "ofType" : null
30 | }
31 | },
32 | "defaultValue" : null
33 | } ],
34 | "type" : {
35 | "kind" : "OBJECT",
36 | "name" : "Deck",
37 | "ofType" : null
38 | },
39 | "isDeprecated" : false,
40 | "deprecationReason" : null
41 | }, {
42 | "name" : "listDecks",
43 | "description" : null,
44 | "args" : [ {
45 | "name" : "filter",
46 | "description" : null,
47 | "type" : {
48 | "kind" : "INPUT_OBJECT",
49 | "name" : "ModelDeckFilterInput",
50 | "ofType" : null
51 | },
52 | "defaultValue" : null
53 | }, {
54 | "name" : "limit",
55 | "description" : null,
56 | "type" : {
57 | "kind" : "SCALAR",
58 | "name" : "Int",
59 | "ofType" : null
60 | },
61 | "defaultValue" : null
62 | }, {
63 | "name" : "nextToken",
64 | "description" : null,
65 | "type" : {
66 | "kind" : "SCALAR",
67 | "name" : "String",
68 | "ofType" : null
69 | },
70 | "defaultValue" : null
71 | } ],
72 | "type" : {
73 | "kind" : "OBJECT",
74 | "name" : "ModelDeckConnection",
75 | "ofType" : null
76 | },
77 | "isDeprecated" : false,
78 | "deprecationReason" : null
79 | }, {
80 | "name" : "getCard",
81 | "description" : null,
82 | "args" : [ {
83 | "name" : "id",
84 | "description" : null,
85 | "type" : {
86 | "kind" : "NON_NULL",
87 | "name" : null,
88 | "ofType" : {
89 | "kind" : "SCALAR",
90 | "name" : "ID",
91 | "ofType" : null
92 | }
93 | },
94 | "defaultValue" : null
95 | } ],
96 | "type" : {
97 | "kind" : "OBJECT",
98 | "name" : "Card",
99 | "ofType" : null
100 | },
101 | "isDeprecated" : false,
102 | "deprecationReason" : null
103 | }, {
104 | "name" : "listCards",
105 | "description" : null,
106 | "args" : [ {
107 | "name" : "filter",
108 | "description" : null,
109 | "type" : {
110 | "kind" : "INPUT_OBJECT",
111 | "name" : "ModelCardFilterInput",
112 | "ofType" : null
113 | },
114 | "defaultValue" : null
115 | }, {
116 | "name" : "limit",
117 | "description" : null,
118 | "type" : {
119 | "kind" : "SCALAR",
120 | "name" : "Int",
121 | "ofType" : null
122 | },
123 | "defaultValue" : null
124 | }, {
125 | "name" : "nextToken",
126 | "description" : null,
127 | "type" : {
128 | "kind" : "SCALAR",
129 | "name" : "String",
130 | "ofType" : null
131 | },
132 | "defaultValue" : null
133 | } ],
134 | "type" : {
135 | "kind" : "OBJECT",
136 | "name" : "ModelCardConnection",
137 | "ofType" : null
138 | },
139 | "isDeprecated" : false,
140 | "deprecationReason" : null
141 | }, {
142 | "name" : "searchCards",
143 | "description" : null,
144 | "args" : [ {
145 | "name" : "filter",
146 | "description" : null,
147 | "type" : {
148 | "kind" : "INPUT_OBJECT",
149 | "name" : "SearchableCardFilterInput",
150 | "ofType" : null
151 | },
152 | "defaultValue" : null
153 | }, {
154 | "name" : "sort",
155 | "description" : null,
156 | "type" : {
157 | "kind" : "INPUT_OBJECT",
158 | "name" : "SearchableCardSortInput",
159 | "ofType" : null
160 | },
161 | "defaultValue" : null
162 | }, {
163 | "name" : "limit",
164 | "description" : null,
165 | "type" : {
166 | "kind" : "SCALAR",
167 | "name" : "Int",
168 | "ofType" : null
169 | },
170 | "defaultValue" : null
171 | }, {
172 | "name" : "nextToken",
173 | "description" : null,
174 | "type" : {
175 | "kind" : "SCALAR",
176 | "name" : "Int",
177 | "ofType" : null
178 | },
179 | "defaultValue" : null
180 | } ],
181 | "type" : {
182 | "kind" : "OBJECT",
183 | "name" : "SearchableCardConnection",
184 | "ofType" : null
185 | },
186 | "isDeprecated" : false,
187 | "deprecationReason" : null
188 | } ],
189 | "inputFields" : null,
190 | "interfaces" : [ ],
191 | "enumValues" : null,
192 | "possibleTypes" : null
193 | }, {
194 | "kind" : "OBJECT",
195 | "name" : "Deck",
196 | "description" : null,
197 | "fields" : [ {
198 | "name" : "id",
199 | "description" : null,
200 | "args" : [ ],
201 | "type" : {
202 | "kind" : "NON_NULL",
203 | "name" : null,
204 | "ofType" : {
205 | "kind" : "SCALAR",
206 | "name" : "ID",
207 | "ofType" : null
208 | }
209 | },
210 | "isDeprecated" : false,
211 | "deprecationReason" : null
212 | }, {
213 | "name" : "name",
214 | "description" : null,
215 | "args" : [ ],
216 | "type" : {
217 | "kind" : "NON_NULL",
218 | "name" : null,
219 | "ofType" : {
220 | "kind" : "SCALAR",
221 | "name" : "String",
222 | "ofType" : null
223 | }
224 | },
225 | "isDeprecated" : false,
226 | "deprecationReason" : null
227 | }, {
228 | "name" : "cards",
229 | "description" : null,
230 | "args" : [ {
231 | "name" : "filter",
232 | "description" : null,
233 | "type" : {
234 | "kind" : "INPUT_OBJECT",
235 | "name" : "ModelCardFilterInput",
236 | "ofType" : null
237 | },
238 | "defaultValue" : null
239 | }, {
240 | "name" : "sortDirection",
241 | "description" : null,
242 | "type" : {
243 | "kind" : "ENUM",
244 | "name" : "ModelSortDirection",
245 | "ofType" : null
246 | },
247 | "defaultValue" : null
248 | }, {
249 | "name" : "limit",
250 | "description" : null,
251 | "type" : {
252 | "kind" : "SCALAR",
253 | "name" : "Int",
254 | "ofType" : null
255 | },
256 | "defaultValue" : null
257 | }, {
258 | "name" : "nextToken",
259 | "description" : null,
260 | "type" : {
261 | "kind" : "SCALAR",
262 | "name" : "String",
263 | "ofType" : null
264 | },
265 | "defaultValue" : null
266 | } ],
267 | "type" : {
268 | "kind" : "OBJECT",
269 | "name" : "ModelCardConnection",
270 | "ofType" : null
271 | },
272 | "isDeprecated" : false,
273 | "deprecationReason" : null
274 | } ],
275 | "inputFields" : null,
276 | "interfaces" : [ ],
277 | "enumValues" : null,
278 | "possibleTypes" : null
279 | }, {
280 | "kind" : "SCALAR",
281 | "name" : "ID",
282 | "description" : "Built-in ID",
283 | "fields" : null,
284 | "inputFields" : null,
285 | "interfaces" : null,
286 | "enumValues" : null,
287 | "possibleTypes" : null
288 | }, {
289 | "kind" : "SCALAR",
290 | "name" : "String",
291 | "description" : "Built-in String",
292 | "fields" : null,
293 | "inputFields" : null,
294 | "interfaces" : null,
295 | "enumValues" : null,
296 | "possibleTypes" : null
297 | }, {
298 | "kind" : "OBJECT",
299 | "name" : "ModelCardConnection",
300 | "description" : null,
301 | "fields" : [ {
302 | "name" : "items",
303 | "description" : null,
304 | "args" : [ ],
305 | "type" : {
306 | "kind" : "LIST",
307 | "name" : null,
308 | "ofType" : {
309 | "kind" : "OBJECT",
310 | "name" : "Card",
311 | "ofType" : null
312 | }
313 | },
314 | "isDeprecated" : false,
315 | "deprecationReason" : null
316 | }, {
317 | "name" : "nextToken",
318 | "description" : null,
319 | "args" : [ ],
320 | "type" : {
321 | "kind" : "SCALAR",
322 | "name" : "String",
323 | "ofType" : null
324 | },
325 | "isDeprecated" : false,
326 | "deprecationReason" : null
327 | } ],
328 | "inputFields" : null,
329 | "interfaces" : [ ],
330 | "enumValues" : null,
331 | "possibleTypes" : null
332 | }, {
333 | "kind" : "OBJECT",
334 | "name" : "Card",
335 | "description" : null,
336 | "fields" : [ {
337 | "name" : "id",
338 | "description" : null,
339 | "args" : [ ],
340 | "type" : {
341 | "kind" : "NON_NULL",
342 | "name" : null,
343 | "ofType" : {
344 | "kind" : "SCALAR",
345 | "name" : "ID",
346 | "ofType" : null
347 | }
348 | },
349 | "isDeprecated" : false,
350 | "deprecationReason" : null
351 | }, {
352 | "name" : "question",
353 | "description" : null,
354 | "args" : [ ],
355 | "type" : {
356 | "kind" : "NON_NULL",
357 | "name" : null,
358 | "ofType" : {
359 | "kind" : "SCALAR",
360 | "name" : "String",
361 | "ofType" : null
362 | }
363 | },
364 | "isDeprecated" : false,
365 | "deprecationReason" : null
366 | }, {
367 | "name" : "answer",
368 | "description" : null,
369 | "args" : [ ],
370 | "type" : {
371 | "kind" : "SCALAR",
372 | "name" : "String",
373 | "ofType" : null
374 | },
375 | "isDeprecated" : false,
376 | "deprecationReason" : null
377 | }, {
378 | "name" : "deck",
379 | "description" : null,
380 | "args" : [ ],
381 | "type" : {
382 | "kind" : "NON_NULL",
383 | "name" : null,
384 | "ofType" : {
385 | "kind" : "OBJECT",
386 | "name" : "Deck",
387 | "ofType" : null
388 | }
389 | },
390 | "isDeprecated" : false,
391 | "deprecationReason" : null
392 | } ],
393 | "inputFields" : null,
394 | "interfaces" : [ ],
395 | "enumValues" : null,
396 | "possibleTypes" : null
397 | }, {
398 | "kind" : "INPUT_OBJECT",
399 | "name" : "ModelCardFilterInput",
400 | "description" : null,
401 | "fields" : null,
402 | "inputFields" : [ {
403 | "name" : "id",
404 | "description" : null,
405 | "type" : {
406 | "kind" : "INPUT_OBJECT",
407 | "name" : "ModelIDFilterInput",
408 | "ofType" : null
409 | },
410 | "defaultValue" : null
411 | }, {
412 | "name" : "question",
413 | "description" : null,
414 | "type" : {
415 | "kind" : "INPUT_OBJECT",
416 | "name" : "ModelStringFilterInput",
417 | "ofType" : null
418 | },
419 | "defaultValue" : null
420 | }, {
421 | "name" : "answer",
422 | "description" : null,
423 | "type" : {
424 | "kind" : "INPUT_OBJECT",
425 | "name" : "ModelStringFilterInput",
426 | "ofType" : null
427 | },
428 | "defaultValue" : null
429 | }, {
430 | "name" : "and",
431 | "description" : null,
432 | "type" : {
433 | "kind" : "LIST",
434 | "name" : null,
435 | "ofType" : {
436 | "kind" : "INPUT_OBJECT",
437 | "name" : "ModelCardFilterInput",
438 | "ofType" : null
439 | }
440 | },
441 | "defaultValue" : null
442 | }, {
443 | "name" : "or",
444 | "description" : null,
445 | "type" : {
446 | "kind" : "LIST",
447 | "name" : null,
448 | "ofType" : {
449 | "kind" : "INPUT_OBJECT",
450 | "name" : "ModelCardFilterInput",
451 | "ofType" : null
452 | }
453 | },
454 | "defaultValue" : null
455 | }, {
456 | "name" : "not",
457 | "description" : null,
458 | "type" : {
459 | "kind" : "INPUT_OBJECT",
460 | "name" : "ModelCardFilterInput",
461 | "ofType" : null
462 | },
463 | "defaultValue" : null
464 | } ],
465 | "interfaces" : null,
466 | "enumValues" : null,
467 | "possibleTypes" : null
468 | }, {
469 | "kind" : "INPUT_OBJECT",
470 | "name" : "ModelIDFilterInput",
471 | "description" : null,
472 | "fields" : null,
473 | "inputFields" : [ {
474 | "name" : "ne",
475 | "description" : null,
476 | "type" : {
477 | "kind" : "SCALAR",
478 | "name" : "ID",
479 | "ofType" : null
480 | },
481 | "defaultValue" : null
482 | }, {
483 | "name" : "eq",
484 | "description" : null,
485 | "type" : {
486 | "kind" : "SCALAR",
487 | "name" : "ID",
488 | "ofType" : null
489 | },
490 | "defaultValue" : null
491 | }, {
492 | "name" : "le",
493 | "description" : null,
494 | "type" : {
495 | "kind" : "SCALAR",
496 | "name" : "ID",
497 | "ofType" : null
498 | },
499 | "defaultValue" : null
500 | }, {
501 | "name" : "lt",
502 | "description" : null,
503 | "type" : {
504 | "kind" : "SCALAR",
505 | "name" : "ID",
506 | "ofType" : null
507 | },
508 | "defaultValue" : null
509 | }, {
510 | "name" : "ge",
511 | "description" : null,
512 | "type" : {
513 | "kind" : "SCALAR",
514 | "name" : "ID",
515 | "ofType" : null
516 | },
517 | "defaultValue" : null
518 | }, {
519 | "name" : "gt",
520 | "description" : null,
521 | "type" : {
522 | "kind" : "SCALAR",
523 | "name" : "ID",
524 | "ofType" : null
525 | },
526 | "defaultValue" : null
527 | }, {
528 | "name" : "contains",
529 | "description" : null,
530 | "type" : {
531 | "kind" : "SCALAR",
532 | "name" : "ID",
533 | "ofType" : null
534 | },
535 | "defaultValue" : null
536 | }, {
537 | "name" : "notContains",
538 | "description" : null,
539 | "type" : {
540 | "kind" : "SCALAR",
541 | "name" : "ID",
542 | "ofType" : null
543 | },
544 | "defaultValue" : null
545 | }, {
546 | "name" : "between",
547 | "description" : null,
548 | "type" : {
549 | "kind" : "LIST",
550 | "name" : null,
551 | "ofType" : {
552 | "kind" : "SCALAR",
553 | "name" : "ID",
554 | "ofType" : null
555 | }
556 | },
557 | "defaultValue" : null
558 | }, {
559 | "name" : "beginsWith",
560 | "description" : null,
561 | "type" : {
562 | "kind" : "SCALAR",
563 | "name" : "ID",
564 | "ofType" : null
565 | },
566 | "defaultValue" : null
567 | } ],
568 | "interfaces" : null,
569 | "enumValues" : null,
570 | "possibleTypes" : null
571 | }, {
572 | "kind" : "INPUT_OBJECT",
573 | "name" : "ModelStringFilterInput",
574 | "description" : null,
575 | "fields" : null,
576 | "inputFields" : [ {
577 | "name" : "ne",
578 | "description" : null,
579 | "type" : {
580 | "kind" : "SCALAR",
581 | "name" : "String",
582 | "ofType" : null
583 | },
584 | "defaultValue" : null
585 | }, {
586 | "name" : "eq",
587 | "description" : null,
588 | "type" : {
589 | "kind" : "SCALAR",
590 | "name" : "String",
591 | "ofType" : null
592 | },
593 | "defaultValue" : null
594 | }, {
595 | "name" : "le",
596 | "description" : null,
597 | "type" : {
598 | "kind" : "SCALAR",
599 | "name" : "String",
600 | "ofType" : null
601 | },
602 | "defaultValue" : null
603 | }, {
604 | "name" : "lt",
605 | "description" : null,
606 | "type" : {
607 | "kind" : "SCALAR",
608 | "name" : "String",
609 | "ofType" : null
610 | },
611 | "defaultValue" : null
612 | }, {
613 | "name" : "ge",
614 | "description" : null,
615 | "type" : {
616 | "kind" : "SCALAR",
617 | "name" : "String",
618 | "ofType" : null
619 | },
620 | "defaultValue" : null
621 | }, {
622 | "name" : "gt",
623 | "description" : null,
624 | "type" : {
625 | "kind" : "SCALAR",
626 | "name" : "String",
627 | "ofType" : null
628 | },
629 | "defaultValue" : null
630 | }, {
631 | "name" : "contains",
632 | "description" : null,
633 | "type" : {
634 | "kind" : "SCALAR",
635 | "name" : "String",
636 | "ofType" : null
637 | },
638 | "defaultValue" : null
639 | }, {
640 | "name" : "notContains",
641 | "description" : null,
642 | "type" : {
643 | "kind" : "SCALAR",
644 | "name" : "String",
645 | "ofType" : null
646 | },
647 | "defaultValue" : null
648 | }, {
649 | "name" : "between",
650 | "description" : null,
651 | "type" : {
652 | "kind" : "LIST",
653 | "name" : null,
654 | "ofType" : {
655 | "kind" : "SCALAR",
656 | "name" : "String",
657 | "ofType" : null
658 | }
659 | },
660 | "defaultValue" : null
661 | }, {
662 | "name" : "beginsWith",
663 | "description" : null,
664 | "type" : {
665 | "kind" : "SCALAR",
666 | "name" : "String",
667 | "ofType" : null
668 | },
669 | "defaultValue" : null
670 | } ],
671 | "interfaces" : null,
672 | "enumValues" : null,
673 | "possibleTypes" : null
674 | }, {
675 | "kind" : "ENUM",
676 | "name" : "ModelSortDirection",
677 | "description" : null,
678 | "fields" : null,
679 | "inputFields" : null,
680 | "interfaces" : null,
681 | "enumValues" : [ {
682 | "name" : "ASC",
683 | "description" : null,
684 | "isDeprecated" : false,
685 | "deprecationReason" : null
686 | }, {
687 | "name" : "DESC",
688 | "description" : null,
689 | "isDeprecated" : false,
690 | "deprecationReason" : null
691 | } ],
692 | "possibleTypes" : null
693 | }, {
694 | "kind" : "SCALAR",
695 | "name" : "Int",
696 | "description" : "Built-in Int",
697 | "fields" : null,
698 | "inputFields" : null,
699 | "interfaces" : null,
700 | "enumValues" : null,
701 | "possibleTypes" : null
702 | }, {
703 | "kind" : "OBJECT",
704 | "name" : "ModelDeckConnection",
705 | "description" : null,
706 | "fields" : [ {
707 | "name" : "items",
708 | "description" : null,
709 | "args" : [ ],
710 | "type" : {
711 | "kind" : "LIST",
712 | "name" : null,
713 | "ofType" : {
714 | "kind" : "OBJECT",
715 | "name" : "Deck",
716 | "ofType" : null
717 | }
718 | },
719 | "isDeprecated" : false,
720 | "deprecationReason" : null
721 | }, {
722 | "name" : "nextToken",
723 | "description" : null,
724 | "args" : [ ],
725 | "type" : {
726 | "kind" : "SCALAR",
727 | "name" : "String",
728 | "ofType" : null
729 | },
730 | "isDeprecated" : false,
731 | "deprecationReason" : null
732 | } ],
733 | "inputFields" : null,
734 | "interfaces" : [ ],
735 | "enumValues" : null,
736 | "possibleTypes" : null
737 | }, {
738 | "kind" : "INPUT_OBJECT",
739 | "name" : "ModelDeckFilterInput",
740 | "description" : null,
741 | "fields" : null,
742 | "inputFields" : [ {
743 | "name" : "id",
744 | "description" : null,
745 | "type" : {
746 | "kind" : "INPUT_OBJECT",
747 | "name" : "ModelIDFilterInput",
748 | "ofType" : null
749 | },
750 | "defaultValue" : null
751 | }, {
752 | "name" : "name",
753 | "description" : null,
754 | "type" : {
755 | "kind" : "INPUT_OBJECT",
756 | "name" : "ModelStringFilterInput",
757 | "ofType" : null
758 | },
759 | "defaultValue" : null
760 | }, {
761 | "name" : "and",
762 | "description" : null,
763 | "type" : {
764 | "kind" : "LIST",
765 | "name" : null,
766 | "ofType" : {
767 | "kind" : "INPUT_OBJECT",
768 | "name" : "ModelDeckFilterInput",
769 | "ofType" : null
770 | }
771 | },
772 | "defaultValue" : null
773 | }, {
774 | "name" : "or",
775 | "description" : null,
776 | "type" : {
777 | "kind" : "LIST",
778 | "name" : null,
779 | "ofType" : {
780 | "kind" : "INPUT_OBJECT",
781 | "name" : "ModelDeckFilterInput",
782 | "ofType" : null
783 | }
784 | },
785 | "defaultValue" : null
786 | }, {
787 | "name" : "not",
788 | "description" : null,
789 | "type" : {
790 | "kind" : "INPUT_OBJECT",
791 | "name" : "ModelDeckFilterInput",
792 | "ofType" : null
793 | },
794 | "defaultValue" : null
795 | } ],
796 | "interfaces" : null,
797 | "enumValues" : null,
798 | "possibleTypes" : null
799 | }, {
800 | "kind" : "OBJECT",
801 | "name" : "SearchableCardConnection",
802 | "description" : null,
803 | "fields" : [ {
804 | "name" : "items",
805 | "description" : null,
806 | "args" : [ ],
807 | "type" : {
808 | "kind" : "LIST",
809 | "name" : null,
810 | "ofType" : {
811 | "kind" : "OBJECT",
812 | "name" : "Card",
813 | "ofType" : null
814 | }
815 | },
816 | "isDeprecated" : false,
817 | "deprecationReason" : null
818 | }, {
819 | "name" : "nextToken",
820 | "description" : null,
821 | "args" : [ ],
822 | "type" : {
823 | "kind" : "SCALAR",
824 | "name" : "String",
825 | "ofType" : null
826 | },
827 | "isDeprecated" : false,
828 | "deprecationReason" : null
829 | } ],
830 | "inputFields" : null,
831 | "interfaces" : [ ],
832 | "enumValues" : null,
833 | "possibleTypes" : null
834 | }, {
835 | "kind" : "INPUT_OBJECT",
836 | "name" : "SearchableCardFilterInput",
837 | "description" : null,
838 | "fields" : null,
839 | "inputFields" : [ {
840 | "name" : "id",
841 | "description" : null,
842 | "type" : {
843 | "kind" : "INPUT_OBJECT",
844 | "name" : "SearchableIDFilterInput",
845 | "ofType" : null
846 | },
847 | "defaultValue" : null
848 | }, {
849 | "name" : "question",
850 | "description" : null,
851 | "type" : {
852 | "kind" : "INPUT_OBJECT",
853 | "name" : "SearchableStringFilterInput",
854 | "ofType" : null
855 | },
856 | "defaultValue" : null
857 | }, {
858 | "name" : "answer",
859 | "description" : null,
860 | "type" : {
861 | "kind" : "INPUT_OBJECT",
862 | "name" : "SearchableStringFilterInput",
863 | "ofType" : null
864 | },
865 | "defaultValue" : null
866 | }, {
867 | "name" : "and",
868 | "description" : null,
869 | "type" : {
870 | "kind" : "LIST",
871 | "name" : null,
872 | "ofType" : {
873 | "kind" : "INPUT_OBJECT",
874 | "name" : "SearchableCardFilterInput",
875 | "ofType" : null
876 | }
877 | },
878 | "defaultValue" : null
879 | }, {
880 | "name" : "or",
881 | "description" : null,
882 | "type" : {
883 | "kind" : "LIST",
884 | "name" : null,
885 | "ofType" : {
886 | "kind" : "INPUT_OBJECT",
887 | "name" : "SearchableCardFilterInput",
888 | "ofType" : null
889 | }
890 | },
891 | "defaultValue" : null
892 | }, {
893 | "name" : "not",
894 | "description" : null,
895 | "type" : {
896 | "kind" : "INPUT_OBJECT",
897 | "name" : "SearchableCardFilterInput",
898 | "ofType" : null
899 | },
900 | "defaultValue" : null
901 | } ],
902 | "interfaces" : null,
903 | "enumValues" : null,
904 | "possibleTypes" : null
905 | }, {
906 | "kind" : "INPUT_OBJECT",
907 | "name" : "SearchableIDFilterInput",
908 | "description" : null,
909 | "fields" : null,
910 | "inputFields" : [ {
911 | "name" : "ne",
912 | "description" : null,
913 | "type" : {
914 | "kind" : "SCALAR",
915 | "name" : "ID",
916 | "ofType" : null
917 | },
918 | "defaultValue" : null
919 | }, {
920 | "name" : "eq",
921 | "description" : null,
922 | "type" : {
923 | "kind" : "SCALAR",
924 | "name" : "ID",
925 | "ofType" : null
926 | },
927 | "defaultValue" : null
928 | }, {
929 | "name" : "match",
930 | "description" : null,
931 | "type" : {
932 | "kind" : "SCALAR",
933 | "name" : "ID",
934 | "ofType" : null
935 | },
936 | "defaultValue" : null
937 | }, {
938 | "name" : "matchPhrase",
939 | "description" : null,
940 | "type" : {
941 | "kind" : "SCALAR",
942 | "name" : "ID",
943 | "ofType" : null
944 | },
945 | "defaultValue" : null
946 | }, {
947 | "name" : "matchPhrasePrefix",
948 | "description" : null,
949 | "type" : {
950 | "kind" : "SCALAR",
951 | "name" : "ID",
952 | "ofType" : null
953 | },
954 | "defaultValue" : null
955 | }, {
956 | "name" : "multiMatch",
957 | "description" : null,
958 | "type" : {
959 | "kind" : "SCALAR",
960 | "name" : "ID",
961 | "ofType" : null
962 | },
963 | "defaultValue" : null
964 | }, {
965 | "name" : "exists",
966 | "description" : null,
967 | "type" : {
968 | "kind" : "SCALAR",
969 | "name" : "Boolean",
970 | "ofType" : null
971 | },
972 | "defaultValue" : null
973 | }, {
974 | "name" : "wildcard",
975 | "description" : null,
976 | "type" : {
977 | "kind" : "SCALAR",
978 | "name" : "ID",
979 | "ofType" : null
980 | },
981 | "defaultValue" : null
982 | }, {
983 | "name" : "regexp",
984 | "description" : null,
985 | "type" : {
986 | "kind" : "SCALAR",
987 | "name" : "ID",
988 | "ofType" : null
989 | },
990 | "defaultValue" : null
991 | } ],
992 | "interfaces" : null,
993 | "enumValues" : null,
994 | "possibleTypes" : null
995 | }, {
996 | "kind" : "SCALAR",
997 | "name" : "Boolean",
998 | "description" : "Built-in Boolean",
999 | "fields" : null,
1000 | "inputFields" : null,
1001 | "interfaces" : null,
1002 | "enumValues" : null,
1003 | "possibleTypes" : null
1004 | }, {
1005 | "kind" : "INPUT_OBJECT",
1006 | "name" : "SearchableStringFilterInput",
1007 | "description" : null,
1008 | "fields" : null,
1009 | "inputFields" : [ {
1010 | "name" : "ne",
1011 | "description" : null,
1012 | "type" : {
1013 | "kind" : "SCALAR",
1014 | "name" : "String",
1015 | "ofType" : null
1016 | },
1017 | "defaultValue" : null
1018 | }, {
1019 | "name" : "eq",
1020 | "description" : null,
1021 | "type" : {
1022 | "kind" : "SCALAR",
1023 | "name" : "String",
1024 | "ofType" : null
1025 | },
1026 | "defaultValue" : null
1027 | }, {
1028 | "name" : "match",
1029 | "description" : null,
1030 | "type" : {
1031 | "kind" : "SCALAR",
1032 | "name" : "String",
1033 | "ofType" : null
1034 | },
1035 | "defaultValue" : null
1036 | }, {
1037 | "name" : "matchPhrase",
1038 | "description" : null,
1039 | "type" : {
1040 | "kind" : "SCALAR",
1041 | "name" : "String",
1042 | "ofType" : null
1043 | },
1044 | "defaultValue" : null
1045 | }, {
1046 | "name" : "matchPhrasePrefix",
1047 | "description" : null,
1048 | "type" : {
1049 | "kind" : "SCALAR",
1050 | "name" : "String",
1051 | "ofType" : null
1052 | },
1053 | "defaultValue" : null
1054 | }, {
1055 | "name" : "multiMatch",
1056 | "description" : null,
1057 | "type" : {
1058 | "kind" : "SCALAR",
1059 | "name" : "String",
1060 | "ofType" : null
1061 | },
1062 | "defaultValue" : null
1063 | }, {
1064 | "name" : "exists",
1065 | "description" : null,
1066 | "type" : {
1067 | "kind" : "SCALAR",
1068 | "name" : "Boolean",
1069 | "ofType" : null
1070 | },
1071 | "defaultValue" : null
1072 | }, {
1073 | "name" : "wildcard",
1074 | "description" : null,
1075 | "type" : {
1076 | "kind" : "SCALAR",
1077 | "name" : "String",
1078 | "ofType" : null
1079 | },
1080 | "defaultValue" : null
1081 | }, {
1082 | "name" : "regexp",
1083 | "description" : null,
1084 | "type" : {
1085 | "kind" : "SCALAR",
1086 | "name" : "String",
1087 | "ofType" : null
1088 | },
1089 | "defaultValue" : null
1090 | } ],
1091 | "interfaces" : null,
1092 | "enumValues" : null,
1093 | "possibleTypes" : null
1094 | }, {
1095 | "kind" : "INPUT_OBJECT",
1096 | "name" : "SearchableCardSortInput",
1097 | "description" : null,
1098 | "fields" : null,
1099 | "inputFields" : [ {
1100 | "name" : "field",
1101 | "description" : null,
1102 | "type" : {
1103 | "kind" : "ENUM",
1104 | "name" : "SearchableCardSortableFields",
1105 | "ofType" : null
1106 | },
1107 | "defaultValue" : null
1108 | }, {
1109 | "name" : "direction",
1110 | "description" : null,
1111 | "type" : {
1112 | "kind" : "ENUM",
1113 | "name" : "SearchableSortDirection",
1114 | "ofType" : null
1115 | },
1116 | "defaultValue" : null
1117 | } ],
1118 | "interfaces" : null,
1119 | "enumValues" : null,
1120 | "possibleTypes" : null
1121 | }, {
1122 | "kind" : "ENUM",
1123 | "name" : "SearchableCardSortableFields",
1124 | "description" : null,
1125 | "fields" : null,
1126 | "inputFields" : null,
1127 | "interfaces" : null,
1128 | "enumValues" : [ {
1129 | "name" : "id",
1130 | "description" : null,
1131 | "isDeprecated" : false,
1132 | "deprecationReason" : null
1133 | }, {
1134 | "name" : "question",
1135 | "description" : null,
1136 | "isDeprecated" : false,
1137 | "deprecationReason" : null
1138 | }, {
1139 | "name" : "answer",
1140 | "description" : null,
1141 | "isDeprecated" : false,
1142 | "deprecationReason" : null
1143 | } ],
1144 | "possibleTypes" : null
1145 | }, {
1146 | "kind" : "ENUM",
1147 | "name" : "SearchableSortDirection",
1148 | "description" : null,
1149 | "fields" : null,
1150 | "inputFields" : null,
1151 | "interfaces" : null,
1152 | "enumValues" : [ {
1153 | "name" : "asc",
1154 | "description" : null,
1155 | "isDeprecated" : false,
1156 | "deprecationReason" : null
1157 | }, {
1158 | "name" : "desc",
1159 | "description" : null,
1160 | "isDeprecated" : false,
1161 | "deprecationReason" : null
1162 | } ],
1163 | "possibleTypes" : null
1164 | }, {
1165 | "kind" : "OBJECT",
1166 | "name" : "Mutation",
1167 | "description" : null,
1168 | "fields" : [ {
1169 | "name" : "createDeck",
1170 | "description" : null,
1171 | "args" : [ {
1172 | "name" : "input",
1173 | "description" : null,
1174 | "type" : {
1175 | "kind" : "NON_NULL",
1176 | "name" : null,
1177 | "ofType" : {
1178 | "kind" : "INPUT_OBJECT",
1179 | "name" : "CreateDeckInput",
1180 | "ofType" : null
1181 | }
1182 | },
1183 | "defaultValue" : null
1184 | } ],
1185 | "type" : {
1186 | "kind" : "OBJECT",
1187 | "name" : "Deck",
1188 | "ofType" : null
1189 | },
1190 | "isDeprecated" : false,
1191 | "deprecationReason" : null
1192 | }, {
1193 | "name" : "updateDeck",
1194 | "description" : null,
1195 | "args" : [ {
1196 | "name" : "input",
1197 | "description" : null,
1198 | "type" : {
1199 | "kind" : "NON_NULL",
1200 | "name" : null,
1201 | "ofType" : {
1202 | "kind" : "INPUT_OBJECT",
1203 | "name" : "UpdateDeckInput",
1204 | "ofType" : null
1205 | }
1206 | },
1207 | "defaultValue" : null
1208 | } ],
1209 | "type" : {
1210 | "kind" : "OBJECT",
1211 | "name" : "Deck",
1212 | "ofType" : null
1213 | },
1214 | "isDeprecated" : false,
1215 | "deprecationReason" : null
1216 | }, {
1217 | "name" : "deleteDeck",
1218 | "description" : null,
1219 | "args" : [ {
1220 | "name" : "input",
1221 | "description" : null,
1222 | "type" : {
1223 | "kind" : "NON_NULL",
1224 | "name" : null,
1225 | "ofType" : {
1226 | "kind" : "INPUT_OBJECT",
1227 | "name" : "DeleteDeckInput",
1228 | "ofType" : null
1229 | }
1230 | },
1231 | "defaultValue" : null
1232 | } ],
1233 | "type" : {
1234 | "kind" : "OBJECT",
1235 | "name" : "Deck",
1236 | "ofType" : null
1237 | },
1238 | "isDeprecated" : false,
1239 | "deprecationReason" : null
1240 | }, {
1241 | "name" : "createCard",
1242 | "description" : null,
1243 | "args" : [ {
1244 | "name" : "input",
1245 | "description" : null,
1246 | "type" : {
1247 | "kind" : "NON_NULL",
1248 | "name" : null,
1249 | "ofType" : {
1250 | "kind" : "INPUT_OBJECT",
1251 | "name" : "CreateCardInput",
1252 | "ofType" : null
1253 | }
1254 | },
1255 | "defaultValue" : null
1256 | } ],
1257 | "type" : {
1258 | "kind" : "OBJECT",
1259 | "name" : "Card",
1260 | "ofType" : null
1261 | },
1262 | "isDeprecated" : false,
1263 | "deprecationReason" : null
1264 | }, {
1265 | "name" : "updateCard",
1266 | "description" : null,
1267 | "args" : [ {
1268 | "name" : "input",
1269 | "description" : null,
1270 | "type" : {
1271 | "kind" : "NON_NULL",
1272 | "name" : null,
1273 | "ofType" : {
1274 | "kind" : "INPUT_OBJECT",
1275 | "name" : "UpdateCardInput",
1276 | "ofType" : null
1277 | }
1278 | },
1279 | "defaultValue" : null
1280 | } ],
1281 | "type" : {
1282 | "kind" : "OBJECT",
1283 | "name" : "Card",
1284 | "ofType" : null
1285 | },
1286 | "isDeprecated" : false,
1287 | "deprecationReason" : null
1288 | }, {
1289 | "name" : "deleteCard",
1290 | "description" : null,
1291 | "args" : [ {
1292 | "name" : "input",
1293 | "description" : null,
1294 | "type" : {
1295 | "kind" : "NON_NULL",
1296 | "name" : null,
1297 | "ofType" : {
1298 | "kind" : "INPUT_OBJECT",
1299 | "name" : "DeleteCardInput",
1300 | "ofType" : null
1301 | }
1302 | },
1303 | "defaultValue" : null
1304 | } ],
1305 | "type" : {
1306 | "kind" : "OBJECT",
1307 | "name" : "Card",
1308 | "ofType" : null
1309 | },
1310 | "isDeprecated" : false,
1311 | "deprecationReason" : null
1312 | } ],
1313 | "inputFields" : null,
1314 | "interfaces" : [ ],
1315 | "enumValues" : null,
1316 | "possibleTypes" : null
1317 | }, {
1318 | "kind" : "INPUT_OBJECT",
1319 | "name" : "CreateDeckInput",
1320 | "description" : null,
1321 | "fields" : null,
1322 | "inputFields" : [ {
1323 | "name" : "id",
1324 | "description" : null,
1325 | "type" : {
1326 | "kind" : "SCALAR",
1327 | "name" : "ID",
1328 | "ofType" : null
1329 | },
1330 | "defaultValue" : null
1331 | }, {
1332 | "name" : "name",
1333 | "description" : null,
1334 | "type" : {
1335 | "kind" : "NON_NULL",
1336 | "name" : null,
1337 | "ofType" : {
1338 | "kind" : "SCALAR",
1339 | "name" : "String",
1340 | "ofType" : null
1341 | }
1342 | },
1343 | "defaultValue" : null
1344 | } ],
1345 | "interfaces" : null,
1346 | "enumValues" : null,
1347 | "possibleTypes" : null
1348 | }, {
1349 | "kind" : "INPUT_OBJECT",
1350 | "name" : "UpdateDeckInput",
1351 | "description" : null,
1352 | "fields" : null,
1353 | "inputFields" : [ {
1354 | "name" : "id",
1355 | "description" : null,
1356 | "type" : {
1357 | "kind" : "NON_NULL",
1358 | "name" : null,
1359 | "ofType" : {
1360 | "kind" : "SCALAR",
1361 | "name" : "ID",
1362 | "ofType" : null
1363 | }
1364 | },
1365 | "defaultValue" : null
1366 | }, {
1367 | "name" : "name",
1368 | "description" : null,
1369 | "type" : {
1370 | "kind" : "SCALAR",
1371 | "name" : "String",
1372 | "ofType" : null
1373 | },
1374 | "defaultValue" : null
1375 | } ],
1376 | "interfaces" : null,
1377 | "enumValues" : null,
1378 | "possibleTypes" : null
1379 | }, {
1380 | "kind" : "INPUT_OBJECT",
1381 | "name" : "DeleteDeckInput",
1382 | "description" : null,
1383 | "fields" : null,
1384 | "inputFields" : [ {
1385 | "name" : "id",
1386 | "description" : null,
1387 | "type" : {
1388 | "kind" : "SCALAR",
1389 | "name" : "ID",
1390 | "ofType" : null
1391 | },
1392 | "defaultValue" : null
1393 | } ],
1394 | "interfaces" : null,
1395 | "enumValues" : null,
1396 | "possibleTypes" : null
1397 | }, {
1398 | "kind" : "INPUT_OBJECT",
1399 | "name" : "CreateCardInput",
1400 | "description" : null,
1401 | "fields" : null,
1402 | "inputFields" : [ {
1403 | "name" : "id",
1404 | "description" : null,
1405 | "type" : {
1406 | "kind" : "SCALAR",
1407 | "name" : "ID",
1408 | "ofType" : null
1409 | },
1410 | "defaultValue" : null
1411 | }, {
1412 | "name" : "question",
1413 | "description" : null,
1414 | "type" : {
1415 | "kind" : "NON_NULL",
1416 | "name" : null,
1417 | "ofType" : {
1418 | "kind" : "SCALAR",
1419 | "name" : "String",
1420 | "ofType" : null
1421 | }
1422 | },
1423 | "defaultValue" : null
1424 | }, {
1425 | "name" : "answer",
1426 | "description" : null,
1427 | "type" : {
1428 | "kind" : "SCALAR",
1429 | "name" : "String",
1430 | "ofType" : null
1431 | },
1432 | "defaultValue" : null
1433 | }, {
1434 | "name" : "cardDeckId",
1435 | "description" : null,
1436 | "type" : {
1437 | "kind" : "NON_NULL",
1438 | "name" : null,
1439 | "ofType" : {
1440 | "kind" : "SCALAR",
1441 | "name" : "ID",
1442 | "ofType" : null
1443 | }
1444 | },
1445 | "defaultValue" : null
1446 | } ],
1447 | "interfaces" : null,
1448 | "enumValues" : null,
1449 | "possibleTypes" : null
1450 | }, {
1451 | "kind" : "INPUT_OBJECT",
1452 | "name" : "UpdateCardInput",
1453 | "description" : null,
1454 | "fields" : null,
1455 | "inputFields" : [ {
1456 | "name" : "id",
1457 | "description" : null,
1458 | "type" : {
1459 | "kind" : "NON_NULL",
1460 | "name" : null,
1461 | "ofType" : {
1462 | "kind" : "SCALAR",
1463 | "name" : "ID",
1464 | "ofType" : null
1465 | }
1466 | },
1467 | "defaultValue" : null
1468 | }, {
1469 | "name" : "question",
1470 | "description" : null,
1471 | "type" : {
1472 | "kind" : "SCALAR",
1473 | "name" : "String",
1474 | "ofType" : null
1475 | },
1476 | "defaultValue" : null
1477 | }, {
1478 | "name" : "answer",
1479 | "description" : null,
1480 | "type" : {
1481 | "kind" : "SCALAR",
1482 | "name" : "String",
1483 | "ofType" : null
1484 | },
1485 | "defaultValue" : null
1486 | }, {
1487 | "name" : "cardDeckId",
1488 | "description" : null,
1489 | "type" : {
1490 | "kind" : "SCALAR",
1491 | "name" : "ID",
1492 | "ofType" : null
1493 | },
1494 | "defaultValue" : null
1495 | } ],
1496 | "interfaces" : null,
1497 | "enumValues" : null,
1498 | "possibleTypes" : null
1499 | }, {
1500 | "kind" : "INPUT_OBJECT",
1501 | "name" : "DeleteCardInput",
1502 | "description" : null,
1503 | "fields" : null,
1504 | "inputFields" : [ {
1505 | "name" : "id",
1506 | "description" : null,
1507 | "type" : {
1508 | "kind" : "SCALAR",
1509 | "name" : "ID",
1510 | "ofType" : null
1511 | },
1512 | "defaultValue" : null
1513 | } ],
1514 | "interfaces" : null,
1515 | "enumValues" : null,
1516 | "possibleTypes" : null
1517 | }, {
1518 | "kind" : "OBJECT",
1519 | "name" : "Subscription",
1520 | "description" : null,
1521 | "fields" : [ {
1522 | "name" : "onCreateDeck",
1523 | "description" : null,
1524 | "args" : [ ],
1525 | "type" : {
1526 | "kind" : "OBJECT",
1527 | "name" : "Deck",
1528 | "ofType" : null
1529 | },
1530 | "isDeprecated" : false,
1531 | "deprecationReason" : null
1532 | }, {
1533 | "name" : "onUpdateDeck",
1534 | "description" : null,
1535 | "args" : [ ],
1536 | "type" : {
1537 | "kind" : "OBJECT",
1538 | "name" : "Deck",
1539 | "ofType" : null
1540 | },
1541 | "isDeprecated" : false,
1542 | "deprecationReason" : null
1543 | }, {
1544 | "name" : "onDeleteDeck",
1545 | "description" : null,
1546 | "args" : [ ],
1547 | "type" : {
1548 | "kind" : "OBJECT",
1549 | "name" : "Deck",
1550 | "ofType" : null
1551 | },
1552 | "isDeprecated" : false,
1553 | "deprecationReason" : null
1554 | }, {
1555 | "name" : "onCreateCard",
1556 | "description" : null,
1557 | "args" : [ ],
1558 | "type" : {
1559 | "kind" : "OBJECT",
1560 | "name" : "Card",
1561 | "ofType" : null
1562 | },
1563 | "isDeprecated" : false,
1564 | "deprecationReason" : null
1565 | }, {
1566 | "name" : "onUpdateCard",
1567 | "description" : null,
1568 | "args" : [ ],
1569 | "type" : {
1570 | "kind" : "OBJECT",
1571 | "name" : "Card",
1572 | "ofType" : null
1573 | },
1574 | "isDeprecated" : false,
1575 | "deprecationReason" : null
1576 | }, {
1577 | "name" : "onDeleteCard",
1578 | "description" : null,
1579 | "args" : [ ],
1580 | "type" : {
1581 | "kind" : "OBJECT",
1582 | "name" : "Card",
1583 | "ofType" : null
1584 | },
1585 | "isDeprecated" : false,
1586 | "deprecationReason" : null
1587 | } ],
1588 | "inputFields" : null,
1589 | "interfaces" : [ ],
1590 | "enumValues" : null,
1591 | "possibleTypes" : null
1592 | }, {
1593 | "kind" : "INPUT_OBJECT",
1594 | "name" : "SearchableFloatFilterInput",
1595 | "description" : null,
1596 | "fields" : null,
1597 | "inputFields" : [ {
1598 | "name" : "ne",
1599 | "description" : null,
1600 | "type" : {
1601 | "kind" : "SCALAR",
1602 | "name" : "Float",
1603 | "ofType" : null
1604 | },
1605 | "defaultValue" : null
1606 | }, {
1607 | "name" : "gt",
1608 | "description" : null,
1609 | "type" : {
1610 | "kind" : "SCALAR",
1611 | "name" : "Float",
1612 | "ofType" : null
1613 | },
1614 | "defaultValue" : null
1615 | }, {
1616 | "name" : "lt",
1617 | "description" : null,
1618 | "type" : {
1619 | "kind" : "SCALAR",
1620 | "name" : "Float",
1621 | "ofType" : null
1622 | },
1623 | "defaultValue" : null
1624 | }, {
1625 | "name" : "gte",
1626 | "description" : null,
1627 | "type" : {
1628 | "kind" : "SCALAR",
1629 | "name" : "Float",
1630 | "ofType" : null
1631 | },
1632 | "defaultValue" : null
1633 | }, {
1634 | "name" : "lte",
1635 | "description" : null,
1636 | "type" : {
1637 | "kind" : "SCALAR",
1638 | "name" : "Float",
1639 | "ofType" : null
1640 | },
1641 | "defaultValue" : null
1642 | }, {
1643 | "name" : "eq",
1644 | "description" : null,
1645 | "type" : {
1646 | "kind" : "SCALAR",
1647 | "name" : "Float",
1648 | "ofType" : null
1649 | },
1650 | "defaultValue" : null
1651 | }, {
1652 | "name" : "range",
1653 | "description" : null,
1654 | "type" : {
1655 | "kind" : "LIST",
1656 | "name" : null,
1657 | "ofType" : {
1658 | "kind" : "SCALAR",
1659 | "name" : "Float",
1660 | "ofType" : null
1661 | }
1662 | },
1663 | "defaultValue" : null
1664 | } ],
1665 | "interfaces" : null,
1666 | "enumValues" : null,
1667 | "possibleTypes" : null
1668 | }, {
1669 | "kind" : "SCALAR",
1670 | "name" : "Float",
1671 | "description" : "Built-in Float",
1672 | "fields" : null,
1673 | "inputFields" : null,
1674 | "interfaces" : null,
1675 | "enumValues" : null,
1676 | "possibleTypes" : null
1677 | }, {
1678 | "kind" : "INPUT_OBJECT",
1679 | "name" : "ModelFloatFilterInput",
1680 | "description" : null,
1681 | "fields" : null,
1682 | "inputFields" : [ {
1683 | "name" : "ne",
1684 | "description" : null,
1685 | "type" : {
1686 | "kind" : "SCALAR",
1687 | "name" : "Float",
1688 | "ofType" : null
1689 | },
1690 | "defaultValue" : null
1691 | }, {
1692 | "name" : "eq",
1693 | "description" : null,
1694 | "type" : {
1695 | "kind" : "SCALAR",
1696 | "name" : "Float",
1697 | "ofType" : null
1698 | },
1699 | "defaultValue" : null
1700 | }, {
1701 | "name" : "le",
1702 | "description" : null,
1703 | "type" : {
1704 | "kind" : "SCALAR",
1705 | "name" : "Float",
1706 | "ofType" : null
1707 | },
1708 | "defaultValue" : null
1709 | }, {
1710 | "name" : "lt",
1711 | "description" : null,
1712 | "type" : {
1713 | "kind" : "SCALAR",
1714 | "name" : "Float",
1715 | "ofType" : null
1716 | },
1717 | "defaultValue" : null
1718 | }, {
1719 | "name" : "ge",
1720 | "description" : null,
1721 | "type" : {
1722 | "kind" : "SCALAR",
1723 | "name" : "Float",
1724 | "ofType" : null
1725 | },
1726 | "defaultValue" : null
1727 | }, {
1728 | "name" : "gt",
1729 | "description" : null,
1730 | "type" : {
1731 | "kind" : "SCALAR",
1732 | "name" : "Float",
1733 | "ofType" : null
1734 | },
1735 | "defaultValue" : null
1736 | }, {
1737 | "name" : "contains",
1738 | "description" : null,
1739 | "type" : {
1740 | "kind" : "SCALAR",
1741 | "name" : "Float",
1742 | "ofType" : null
1743 | },
1744 | "defaultValue" : null
1745 | }, {
1746 | "name" : "notContains",
1747 | "description" : null,
1748 | "type" : {
1749 | "kind" : "SCALAR",
1750 | "name" : "Float",
1751 | "ofType" : null
1752 | },
1753 | "defaultValue" : null
1754 | }, {
1755 | "name" : "between",
1756 | "description" : null,
1757 | "type" : {
1758 | "kind" : "LIST",
1759 | "name" : null,
1760 | "ofType" : {
1761 | "kind" : "SCALAR",
1762 | "name" : "Float",
1763 | "ofType" : null
1764 | }
1765 | },
1766 | "defaultValue" : null
1767 | } ],
1768 | "interfaces" : null,
1769 | "enumValues" : null,
1770 | "possibleTypes" : null
1771 | }, {
1772 | "kind" : "INPUT_OBJECT",
1773 | "name" : "ModelBooleanFilterInput",
1774 | "description" : null,
1775 | "fields" : null,
1776 | "inputFields" : [ {
1777 | "name" : "ne",
1778 | "description" : null,
1779 | "type" : {
1780 | "kind" : "SCALAR",
1781 | "name" : "Boolean",
1782 | "ofType" : null
1783 | },
1784 | "defaultValue" : null
1785 | }, {
1786 | "name" : "eq",
1787 | "description" : null,
1788 | "type" : {
1789 | "kind" : "SCALAR",
1790 | "name" : "Boolean",
1791 | "ofType" : null
1792 | },
1793 | "defaultValue" : null
1794 | } ],
1795 | "interfaces" : null,
1796 | "enumValues" : null,
1797 | "possibleTypes" : null
1798 | }, {
1799 | "kind" : "INPUT_OBJECT",
1800 | "name" : "ModelIntFilterInput",
1801 | "description" : null,
1802 | "fields" : null,
1803 | "inputFields" : [ {
1804 | "name" : "ne",
1805 | "description" : null,
1806 | "type" : {
1807 | "kind" : "SCALAR",
1808 | "name" : "Int",
1809 | "ofType" : null
1810 | },
1811 | "defaultValue" : null
1812 | }, {
1813 | "name" : "eq",
1814 | "description" : null,
1815 | "type" : {
1816 | "kind" : "SCALAR",
1817 | "name" : "Int",
1818 | "ofType" : null
1819 | },
1820 | "defaultValue" : null
1821 | }, {
1822 | "name" : "le",
1823 | "description" : null,
1824 | "type" : {
1825 | "kind" : "SCALAR",
1826 | "name" : "Int",
1827 | "ofType" : null
1828 | },
1829 | "defaultValue" : null
1830 | }, {
1831 | "name" : "lt",
1832 | "description" : null,
1833 | "type" : {
1834 | "kind" : "SCALAR",
1835 | "name" : "Int",
1836 | "ofType" : null
1837 | },
1838 | "defaultValue" : null
1839 | }, {
1840 | "name" : "ge",
1841 | "description" : null,
1842 | "type" : {
1843 | "kind" : "SCALAR",
1844 | "name" : "Int",
1845 | "ofType" : null
1846 | },
1847 | "defaultValue" : null
1848 | }, {
1849 | "name" : "gt",
1850 | "description" : null,
1851 | "type" : {
1852 | "kind" : "SCALAR",
1853 | "name" : "Int",
1854 | "ofType" : null
1855 | },
1856 | "defaultValue" : null
1857 | }, {
1858 | "name" : "contains",
1859 | "description" : null,
1860 | "type" : {
1861 | "kind" : "SCALAR",
1862 | "name" : "Int",
1863 | "ofType" : null
1864 | },
1865 | "defaultValue" : null
1866 | }, {
1867 | "name" : "notContains",
1868 | "description" : null,
1869 | "type" : {
1870 | "kind" : "SCALAR",
1871 | "name" : "Int",
1872 | "ofType" : null
1873 | },
1874 | "defaultValue" : null
1875 | }, {
1876 | "name" : "between",
1877 | "description" : null,
1878 | "type" : {
1879 | "kind" : "LIST",
1880 | "name" : null,
1881 | "ofType" : {
1882 | "kind" : "SCALAR",
1883 | "name" : "Int",
1884 | "ofType" : null
1885 | }
1886 | },
1887 | "defaultValue" : null
1888 | } ],
1889 | "interfaces" : null,
1890 | "enumValues" : null,
1891 | "possibleTypes" : null
1892 | }, {
1893 | "kind" : "INPUT_OBJECT",
1894 | "name" : "SearchableBooleanFilterInput",
1895 | "description" : null,
1896 | "fields" : null,
1897 | "inputFields" : [ {
1898 | "name" : "eq",
1899 | "description" : null,
1900 | "type" : {
1901 | "kind" : "SCALAR",
1902 | "name" : "Boolean",
1903 | "ofType" : null
1904 | },
1905 | "defaultValue" : null
1906 | }, {
1907 | "name" : "ne",
1908 | "description" : null,
1909 | "type" : {
1910 | "kind" : "SCALAR",
1911 | "name" : "Boolean",
1912 | "ofType" : null
1913 | },
1914 | "defaultValue" : null
1915 | } ],
1916 | "interfaces" : null,
1917 | "enumValues" : null,
1918 | "possibleTypes" : null
1919 | }, {
1920 | "kind" : "INPUT_OBJECT",
1921 | "name" : "SearchableIntFilterInput",
1922 | "description" : null,
1923 | "fields" : null,
1924 | "inputFields" : [ {
1925 | "name" : "ne",
1926 | "description" : null,
1927 | "type" : {
1928 | "kind" : "SCALAR",
1929 | "name" : "Int",
1930 | "ofType" : null
1931 | },
1932 | "defaultValue" : null
1933 | }, {
1934 | "name" : "gt",
1935 | "description" : null,
1936 | "type" : {
1937 | "kind" : "SCALAR",
1938 | "name" : "Int",
1939 | "ofType" : null
1940 | },
1941 | "defaultValue" : null
1942 | }, {
1943 | "name" : "lt",
1944 | "description" : null,
1945 | "type" : {
1946 | "kind" : "SCALAR",
1947 | "name" : "Int",
1948 | "ofType" : null
1949 | },
1950 | "defaultValue" : null
1951 | }, {
1952 | "name" : "gte",
1953 | "description" : null,
1954 | "type" : {
1955 | "kind" : "SCALAR",
1956 | "name" : "Int",
1957 | "ofType" : null
1958 | },
1959 | "defaultValue" : null
1960 | }, {
1961 | "name" : "lte",
1962 | "description" : null,
1963 | "type" : {
1964 | "kind" : "SCALAR",
1965 | "name" : "Int",
1966 | "ofType" : null
1967 | },
1968 | "defaultValue" : null
1969 | }, {
1970 | "name" : "eq",
1971 | "description" : null,
1972 | "type" : {
1973 | "kind" : "SCALAR",
1974 | "name" : "Int",
1975 | "ofType" : null
1976 | },
1977 | "defaultValue" : null
1978 | }, {
1979 | "name" : "range",
1980 | "description" : null,
1981 | "type" : {
1982 | "kind" : "LIST",
1983 | "name" : null,
1984 | "ofType" : {
1985 | "kind" : "SCALAR",
1986 | "name" : "Int",
1987 | "ofType" : null
1988 | }
1989 | },
1990 | "defaultValue" : null
1991 | } ],
1992 | "interfaces" : null,
1993 | "enumValues" : null,
1994 | "possibleTypes" : null
1995 | }, {
1996 | "kind" : "OBJECT",
1997 | "name" : "__Schema",
1998 | "description" : "A GraphQL Introspection defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, the entry points for query, mutation, and subscription operations.",
1999 | "fields" : [ {
2000 | "name" : "types",
2001 | "description" : "A list of all types supported by this server.",
2002 | "args" : [ ],
2003 | "type" : {
2004 | "kind" : "NON_NULL",
2005 | "name" : null,
2006 | "ofType" : {
2007 | "kind" : "LIST",
2008 | "name" : null,
2009 | "ofType" : {
2010 | "kind" : "NON_NULL",
2011 | "name" : null,
2012 | "ofType" : {
2013 | "kind" : "OBJECT",
2014 | "name" : "__Type",
2015 | "ofType" : null
2016 | }
2017 | }
2018 | }
2019 | },
2020 | "isDeprecated" : false,
2021 | "deprecationReason" : null
2022 | }, {
2023 | "name" : "queryType",
2024 | "description" : "The type that query operations will be rooted at.",
2025 | "args" : [ ],
2026 | "type" : {
2027 | "kind" : "NON_NULL",
2028 | "name" : null,
2029 | "ofType" : {
2030 | "kind" : "OBJECT",
2031 | "name" : "__Type",
2032 | "ofType" : null
2033 | }
2034 | },
2035 | "isDeprecated" : false,
2036 | "deprecationReason" : null
2037 | }, {
2038 | "name" : "mutationType",
2039 | "description" : "If this server supports mutation, the type that mutation operations will be rooted at.",
2040 | "args" : [ ],
2041 | "type" : {
2042 | "kind" : "OBJECT",
2043 | "name" : "__Type",
2044 | "ofType" : null
2045 | },
2046 | "isDeprecated" : false,
2047 | "deprecationReason" : null
2048 | }, {
2049 | "name" : "directives",
2050 | "description" : "'A list of all directives supported by this server.",
2051 | "args" : [ ],
2052 | "type" : {
2053 | "kind" : "NON_NULL",
2054 | "name" : null,
2055 | "ofType" : {
2056 | "kind" : "LIST",
2057 | "name" : null,
2058 | "ofType" : {
2059 | "kind" : "NON_NULL",
2060 | "name" : null,
2061 | "ofType" : {
2062 | "kind" : "OBJECT",
2063 | "name" : "__Directive",
2064 | "ofType" : null
2065 | }
2066 | }
2067 | }
2068 | },
2069 | "isDeprecated" : false,
2070 | "deprecationReason" : null
2071 | }, {
2072 | "name" : "subscriptionType",
2073 | "description" : "'If this server support subscription, the type that subscription operations will be rooted at.",
2074 | "args" : [ ],
2075 | "type" : {
2076 | "kind" : "OBJECT",
2077 | "name" : "__Type",
2078 | "ofType" : null
2079 | },
2080 | "isDeprecated" : false,
2081 | "deprecationReason" : null
2082 | } ],
2083 | "inputFields" : null,
2084 | "interfaces" : [ ],
2085 | "enumValues" : null,
2086 | "possibleTypes" : null
2087 | }, {
2088 | "kind" : "OBJECT",
2089 | "name" : "__Type",
2090 | "description" : null,
2091 | "fields" : [ {
2092 | "name" : "kind",
2093 | "description" : null,
2094 | "args" : [ ],
2095 | "type" : {
2096 | "kind" : "NON_NULL",
2097 | "name" : null,
2098 | "ofType" : {
2099 | "kind" : "ENUM",
2100 | "name" : "__TypeKind",
2101 | "ofType" : null
2102 | }
2103 | },
2104 | "isDeprecated" : false,
2105 | "deprecationReason" : null
2106 | }, {
2107 | "name" : "name",
2108 | "description" : null,
2109 | "args" : [ ],
2110 | "type" : {
2111 | "kind" : "SCALAR",
2112 | "name" : "String",
2113 | "ofType" : null
2114 | },
2115 | "isDeprecated" : false,
2116 | "deprecationReason" : null
2117 | }, {
2118 | "name" : "description",
2119 | "description" : null,
2120 | "args" : [ ],
2121 | "type" : {
2122 | "kind" : "SCALAR",
2123 | "name" : "String",
2124 | "ofType" : null
2125 | },
2126 | "isDeprecated" : false,
2127 | "deprecationReason" : null
2128 | }, {
2129 | "name" : "fields",
2130 | "description" : null,
2131 | "args" : [ {
2132 | "name" : "includeDeprecated",
2133 | "description" : null,
2134 | "type" : {
2135 | "kind" : "SCALAR",
2136 | "name" : "Boolean",
2137 | "ofType" : null
2138 | },
2139 | "defaultValue" : "false"
2140 | } ],
2141 | "type" : {
2142 | "kind" : "LIST",
2143 | "name" : null,
2144 | "ofType" : {
2145 | "kind" : "NON_NULL",
2146 | "name" : null,
2147 | "ofType" : {
2148 | "kind" : "OBJECT",
2149 | "name" : "__Field",
2150 | "ofType" : null
2151 | }
2152 | }
2153 | },
2154 | "isDeprecated" : false,
2155 | "deprecationReason" : null
2156 | }, {
2157 | "name" : "interfaces",
2158 | "description" : null,
2159 | "args" : [ ],
2160 | "type" : {
2161 | "kind" : "LIST",
2162 | "name" : null,
2163 | "ofType" : {
2164 | "kind" : "NON_NULL",
2165 | "name" : null,
2166 | "ofType" : {
2167 | "kind" : "OBJECT",
2168 | "name" : "__Type",
2169 | "ofType" : null
2170 | }
2171 | }
2172 | },
2173 | "isDeprecated" : false,
2174 | "deprecationReason" : null
2175 | }, {
2176 | "name" : "possibleTypes",
2177 | "description" : null,
2178 | "args" : [ ],
2179 | "type" : {
2180 | "kind" : "LIST",
2181 | "name" : null,
2182 | "ofType" : {
2183 | "kind" : "NON_NULL",
2184 | "name" : null,
2185 | "ofType" : {
2186 | "kind" : "OBJECT",
2187 | "name" : "__Type",
2188 | "ofType" : null
2189 | }
2190 | }
2191 | },
2192 | "isDeprecated" : false,
2193 | "deprecationReason" : null
2194 | }, {
2195 | "name" : "enumValues",
2196 | "description" : null,
2197 | "args" : [ {
2198 | "name" : "includeDeprecated",
2199 | "description" : null,
2200 | "type" : {
2201 | "kind" : "SCALAR",
2202 | "name" : "Boolean",
2203 | "ofType" : null
2204 | },
2205 | "defaultValue" : "false"
2206 | } ],
2207 | "type" : {
2208 | "kind" : "LIST",
2209 | "name" : null,
2210 | "ofType" : {
2211 | "kind" : "NON_NULL",
2212 | "name" : null,
2213 | "ofType" : {
2214 | "kind" : "OBJECT",
2215 | "name" : "__EnumValue",
2216 | "ofType" : null
2217 | }
2218 | }
2219 | },
2220 | "isDeprecated" : false,
2221 | "deprecationReason" : null
2222 | }, {
2223 | "name" : "inputFields",
2224 | "description" : null,
2225 | "args" : [ ],
2226 | "type" : {
2227 | "kind" : "LIST",
2228 | "name" : null,
2229 | "ofType" : {
2230 | "kind" : "NON_NULL",
2231 | "name" : null,
2232 | "ofType" : {
2233 | "kind" : "OBJECT",
2234 | "name" : "__InputValue",
2235 | "ofType" : null
2236 | }
2237 | }
2238 | },
2239 | "isDeprecated" : false,
2240 | "deprecationReason" : null
2241 | }, {
2242 | "name" : "ofType",
2243 | "description" : null,
2244 | "args" : [ ],
2245 | "type" : {
2246 | "kind" : "OBJECT",
2247 | "name" : "__Type",
2248 | "ofType" : null
2249 | },
2250 | "isDeprecated" : false,
2251 | "deprecationReason" : null
2252 | } ],
2253 | "inputFields" : null,
2254 | "interfaces" : [ ],
2255 | "enumValues" : null,
2256 | "possibleTypes" : null
2257 | }, {
2258 | "kind" : "ENUM",
2259 | "name" : "__TypeKind",
2260 | "description" : "An enum describing what kind of type a given __Type is",
2261 | "fields" : null,
2262 | "inputFields" : null,
2263 | "interfaces" : null,
2264 | "enumValues" : [ {
2265 | "name" : "SCALAR",
2266 | "description" : "Indicates this type is a scalar.",
2267 | "isDeprecated" : false,
2268 | "deprecationReason" : null
2269 | }, {
2270 | "name" : "OBJECT",
2271 | "description" : "Indicates this type is an object. `fields` and `interfaces` are valid fields.",
2272 | "isDeprecated" : false,
2273 | "deprecationReason" : null
2274 | }, {
2275 | "name" : "INTERFACE",
2276 | "description" : "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.",
2277 | "isDeprecated" : false,
2278 | "deprecationReason" : null
2279 | }, {
2280 | "name" : "UNION",
2281 | "description" : "Indicates this type is a union. `possibleTypes` is a valid field.",
2282 | "isDeprecated" : false,
2283 | "deprecationReason" : null
2284 | }, {
2285 | "name" : "ENUM",
2286 | "description" : "Indicates this type is an enum. `enumValues` is a valid field.",
2287 | "isDeprecated" : false,
2288 | "deprecationReason" : null
2289 | }, {
2290 | "name" : "INPUT_OBJECT",
2291 | "description" : "Indicates this type is an input object. `inputFields` is a valid field.",
2292 | "isDeprecated" : false,
2293 | "deprecationReason" : null
2294 | }, {
2295 | "name" : "LIST",
2296 | "description" : "Indicates this type is a list. `ofType` is a valid field.",
2297 | "isDeprecated" : false,
2298 | "deprecationReason" : null
2299 | }, {
2300 | "name" : "NON_NULL",
2301 | "description" : "Indicates this type is a non-null. `ofType` is a valid field.",
2302 | "isDeprecated" : false,
2303 | "deprecationReason" : null
2304 | } ],
2305 | "possibleTypes" : null
2306 | }, {
2307 | "kind" : "OBJECT",
2308 | "name" : "__Field",
2309 | "description" : null,
2310 | "fields" : [ {
2311 | "name" : "name",
2312 | "description" : null,
2313 | "args" : [ ],
2314 | "type" : {
2315 | "kind" : "NON_NULL",
2316 | "name" : null,
2317 | "ofType" : {
2318 | "kind" : "SCALAR",
2319 | "name" : "String",
2320 | "ofType" : null
2321 | }
2322 | },
2323 | "isDeprecated" : false,
2324 | "deprecationReason" : null
2325 | }, {
2326 | "name" : "description",
2327 | "description" : null,
2328 | "args" : [ ],
2329 | "type" : {
2330 | "kind" : "SCALAR",
2331 | "name" : "String",
2332 | "ofType" : null
2333 | },
2334 | "isDeprecated" : false,
2335 | "deprecationReason" : null
2336 | }, {
2337 | "name" : "args",
2338 | "description" : null,
2339 | "args" : [ ],
2340 | "type" : {
2341 | "kind" : "NON_NULL",
2342 | "name" : null,
2343 | "ofType" : {
2344 | "kind" : "LIST",
2345 | "name" : null,
2346 | "ofType" : {
2347 | "kind" : "NON_NULL",
2348 | "name" : null,
2349 | "ofType" : {
2350 | "kind" : "OBJECT",
2351 | "name" : "__InputValue",
2352 | "ofType" : null
2353 | }
2354 | }
2355 | }
2356 | },
2357 | "isDeprecated" : false,
2358 | "deprecationReason" : null
2359 | }, {
2360 | "name" : "type",
2361 | "description" : null,
2362 | "args" : [ ],
2363 | "type" : {
2364 | "kind" : "NON_NULL",
2365 | "name" : null,
2366 | "ofType" : {
2367 | "kind" : "OBJECT",
2368 | "name" : "__Type",
2369 | "ofType" : null
2370 | }
2371 | },
2372 | "isDeprecated" : false,
2373 | "deprecationReason" : null
2374 | }, {
2375 | "name" : "isDeprecated",
2376 | "description" : null,
2377 | "args" : [ ],
2378 | "type" : {
2379 | "kind" : "NON_NULL",
2380 | "name" : null,
2381 | "ofType" : {
2382 | "kind" : "SCALAR",
2383 | "name" : "Boolean",
2384 | "ofType" : null
2385 | }
2386 | },
2387 | "isDeprecated" : false,
2388 | "deprecationReason" : null
2389 | }, {
2390 | "name" : "deprecationReason",
2391 | "description" : null,
2392 | "args" : [ ],
2393 | "type" : {
2394 | "kind" : "SCALAR",
2395 | "name" : "String",
2396 | "ofType" : null
2397 | },
2398 | "isDeprecated" : false,
2399 | "deprecationReason" : null
2400 | } ],
2401 | "inputFields" : null,
2402 | "interfaces" : [ ],
2403 | "enumValues" : null,
2404 | "possibleTypes" : null
2405 | }, {
2406 | "kind" : "OBJECT",
2407 | "name" : "__InputValue",
2408 | "description" : null,
2409 | "fields" : [ {
2410 | "name" : "name",
2411 | "description" : null,
2412 | "args" : [ ],
2413 | "type" : {
2414 | "kind" : "NON_NULL",
2415 | "name" : null,
2416 | "ofType" : {
2417 | "kind" : "SCALAR",
2418 | "name" : "String",
2419 | "ofType" : null
2420 | }
2421 | },
2422 | "isDeprecated" : false,
2423 | "deprecationReason" : null
2424 | }, {
2425 | "name" : "description",
2426 | "description" : null,
2427 | "args" : [ ],
2428 | "type" : {
2429 | "kind" : "SCALAR",
2430 | "name" : "String",
2431 | "ofType" : null
2432 | },
2433 | "isDeprecated" : false,
2434 | "deprecationReason" : null
2435 | }, {
2436 | "name" : "type",
2437 | "description" : null,
2438 | "args" : [ ],
2439 | "type" : {
2440 | "kind" : "NON_NULL",
2441 | "name" : null,
2442 | "ofType" : {
2443 | "kind" : "OBJECT",
2444 | "name" : "__Type",
2445 | "ofType" : null
2446 | }
2447 | },
2448 | "isDeprecated" : false,
2449 | "deprecationReason" : null
2450 | }, {
2451 | "name" : "defaultValue",
2452 | "description" : null,
2453 | "args" : [ ],
2454 | "type" : {
2455 | "kind" : "SCALAR",
2456 | "name" : "String",
2457 | "ofType" : null
2458 | },
2459 | "isDeprecated" : false,
2460 | "deprecationReason" : null
2461 | } ],
2462 | "inputFields" : null,
2463 | "interfaces" : [ ],
2464 | "enumValues" : null,
2465 | "possibleTypes" : null
2466 | }, {
2467 | "kind" : "OBJECT",
2468 | "name" : "__EnumValue",
2469 | "description" : null,
2470 | "fields" : [ {
2471 | "name" : "name",
2472 | "description" : null,
2473 | "args" : [ ],
2474 | "type" : {
2475 | "kind" : "NON_NULL",
2476 | "name" : null,
2477 | "ofType" : {
2478 | "kind" : "SCALAR",
2479 | "name" : "String",
2480 | "ofType" : null
2481 | }
2482 | },
2483 | "isDeprecated" : false,
2484 | "deprecationReason" : null
2485 | }, {
2486 | "name" : "description",
2487 | "description" : null,
2488 | "args" : [ ],
2489 | "type" : {
2490 | "kind" : "SCALAR",
2491 | "name" : "String",
2492 | "ofType" : null
2493 | },
2494 | "isDeprecated" : false,
2495 | "deprecationReason" : null
2496 | }, {
2497 | "name" : "isDeprecated",
2498 | "description" : null,
2499 | "args" : [ ],
2500 | "type" : {
2501 | "kind" : "NON_NULL",
2502 | "name" : null,
2503 | "ofType" : {
2504 | "kind" : "SCALAR",
2505 | "name" : "Boolean",
2506 | "ofType" : null
2507 | }
2508 | },
2509 | "isDeprecated" : false,
2510 | "deprecationReason" : null
2511 | }, {
2512 | "name" : "deprecationReason",
2513 | "description" : null,
2514 | "args" : [ ],
2515 | "type" : {
2516 | "kind" : "SCALAR",
2517 | "name" : "String",
2518 | "ofType" : null
2519 | },
2520 | "isDeprecated" : false,
2521 | "deprecationReason" : null
2522 | } ],
2523 | "inputFields" : null,
2524 | "interfaces" : [ ],
2525 | "enumValues" : null,
2526 | "possibleTypes" : null
2527 | }, {
2528 | "kind" : "OBJECT",
2529 | "name" : "__Directive",
2530 | "description" : null,
2531 | "fields" : [ {
2532 | "name" : "name",
2533 | "description" : null,
2534 | "args" : [ ],
2535 | "type" : {
2536 | "kind" : "SCALAR",
2537 | "name" : "String",
2538 | "ofType" : null
2539 | },
2540 | "isDeprecated" : false,
2541 | "deprecationReason" : null
2542 | }, {
2543 | "name" : "description",
2544 | "description" : null,
2545 | "args" : [ ],
2546 | "type" : {
2547 | "kind" : "SCALAR",
2548 | "name" : "String",
2549 | "ofType" : null
2550 | },
2551 | "isDeprecated" : false,
2552 | "deprecationReason" : null
2553 | }, {
2554 | "name" : "locations",
2555 | "description" : null,
2556 | "args" : [ ],
2557 | "type" : {
2558 | "kind" : "LIST",
2559 | "name" : null,
2560 | "ofType" : {
2561 | "kind" : "NON_NULL",
2562 | "name" : null,
2563 | "ofType" : {
2564 | "kind" : "ENUM",
2565 | "name" : "__DirectiveLocation",
2566 | "ofType" : null
2567 | }
2568 | }
2569 | },
2570 | "isDeprecated" : false,
2571 | "deprecationReason" : null
2572 | }, {
2573 | "name" : "args",
2574 | "description" : null,
2575 | "args" : [ ],
2576 | "type" : {
2577 | "kind" : "NON_NULL",
2578 | "name" : null,
2579 | "ofType" : {
2580 | "kind" : "LIST",
2581 | "name" : null,
2582 | "ofType" : {
2583 | "kind" : "NON_NULL",
2584 | "name" : null,
2585 | "ofType" : {
2586 | "kind" : "OBJECT",
2587 | "name" : "__InputValue",
2588 | "ofType" : null
2589 | }
2590 | }
2591 | }
2592 | },
2593 | "isDeprecated" : false,
2594 | "deprecationReason" : null
2595 | }, {
2596 | "name" : "onOperation",
2597 | "description" : null,
2598 | "args" : [ ],
2599 | "type" : {
2600 | "kind" : "SCALAR",
2601 | "name" : "Boolean",
2602 | "ofType" : null
2603 | },
2604 | "isDeprecated" : true,
2605 | "deprecationReason" : "Use `locations`."
2606 | }, {
2607 | "name" : "onFragment",
2608 | "description" : null,
2609 | "args" : [ ],
2610 | "type" : {
2611 | "kind" : "SCALAR",
2612 | "name" : "Boolean",
2613 | "ofType" : null
2614 | },
2615 | "isDeprecated" : true,
2616 | "deprecationReason" : "Use `locations`."
2617 | }, {
2618 | "name" : "onField",
2619 | "description" : null,
2620 | "args" : [ ],
2621 | "type" : {
2622 | "kind" : "SCALAR",
2623 | "name" : "Boolean",
2624 | "ofType" : null
2625 | },
2626 | "isDeprecated" : true,
2627 | "deprecationReason" : "Use `locations`."
2628 | } ],
2629 | "inputFields" : null,
2630 | "interfaces" : [ ],
2631 | "enumValues" : null,
2632 | "possibleTypes" : null
2633 | }, {
2634 | "kind" : "ENUM",
2635 | "name" : "__DirectiveLocation",
2636 | "description" : "An enum describing valid locations where a directive can be placed",
2637 | "fields" : null,
2638 | "inputFields" : null,
2639 | "interfaces" : null,
2640 | "enumValues" : [ {
2641 | "name" : "QUERY",
2642 | "description" : "Indicates the directive is valid on queries.",
2643 | "isDeprecated" : false,
2644 | "deprecationReason" : null
2645 | }, {
2646 | "name" : "MUTATION",
2647 | "description" : "Indicates the directive is valid on mutations.",
2648 | "isDeprecated" : false,
2649 | "deprecationReason" : null
2650 | }, {
2651 | "name" : "FIELD",
2652 | "description" : "Indicates the directive is valid on fields.",
2653 | "isDeprecated" : false,
2654 | "deprecationReason" : null
2655 | }, {
2656 | "name" : "FRAGMENT_DEFINITION",
2657 | "description" : "Indicates the directive is valid on fragment definitions.",
2658 | "isDeprecated" : false,
2659 | "deprecationReason" : null
2660 | }, {
2661 | "name" : "FRAGMENT_SPREAD",
2662 | "description" : "Indicates the directive is valid on fragment spreads.",
2663 | "isDeprecated" : false,
2664 | "deprecationReason" : null
2665 | }, {
2666 | "name" : "INLINE_FRAGMENT",
2667 | "description" : "Indicates the directive is valid on inline fragments.",
2668 | "isDeprecated" : false,
2669 | "deprecationReason" : null
2670 | }, {
2671 | "name" : "SCHEMA",
2672 | "description" : "Indicates the directive is valid on a schema SDL definition.",
2673 | "isDeprecated" : false,
2674 | "deprecationReason" : null
2675 | }, {
2676 | "name" : "SCALAR",
2677 | "description" : "Indicates the directive is valid on a scalar SDL definition.",
2678 | "isDeprecated" : false,
2679 | "deprecationReason" : null
2680 | }, {
2681 | "name" : "OBJECT",
2682 | "description" : "Indicates the directive is valid on an object SDL definition.",
2683 | "isDeprecated" : false,
2684 | "deprecationReason" : null
2685 | }, {
2686 | "name" : "FIELD_DEFINITION",
2687 | "description" : "Indicates the directive is valid on a field SDL definition.",
2688 | "isDeprecated" : false,
2689 | "deprecationReason" : null
2690 | }, {
2691 | "name" : "ARGUMENT_DEFINITION",
2692 | "description" : "Indicates the directive is valid on a field argument SDL definition.",
2693 | "isDeprecated" : false,
2694 | "deprecationReason" : null
2695 | }, {
2696 | "name" : "INTERFACE",
2697 | "description" : "Indicates the directive is valid on an interface SDL definition.",
2698 | "isDeprecated" : false,
2699 | "deprecationReason" : null
2700 | }, {
2701 | "name" : "UNION",
2702 | "description" : "Indicates the directive is valid on an union SDL definition.",
2703 | "isDeprecated" : false,
2704 | "deprecationReason" : null
2705 | }, {
2706 | "name" : "ENUM",
2707 | "description" : "Indicates the directive is valid on an enum SDL definition.",
2708 | "isDeprecated" : false,
2709 | "deprecationReason" : null
2710 | }, {
2711 | "name" : "ENUM_VALUE",
2712 | "description" : "Indicates the directive is valid on an enum value SDL definition.",
2713 | "isDeprecated" : false,
2714 | "deprecationReason" : null
2715 | }, {
2716 | "name" : "INPUT_OBJECT",
2717 | "description" : "Indicates the directive is valid on an input object SDL definition.",
2718 | "isDeprecated" : false,
2719 | "deprecationReason" : null
2720 | }, {
2721 | "name" : "INPUT_FIELD_DEFINITION",
2722 | "description" : "Indicates the directive is valid on an input object field SDL definition.",
2723 | "isDeprecated" : false,
2724 | "deprecationReason" : null
2725 | } ],
2726 | "possibleTypes" : null
2727 | } ],
2728 | "directives" : [ {
2729 | "name" : "include",
2730 | "description" : "Directs the executor to include this field or fragment only when the `if` argument is true",
2731 | "locations" : [ "FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT" ],
2732 | "args" : [ {
2733 | "name" : "if",
2734 | "description" : "Included when true.",
2735 | "type" : {
2736 | "kind" : "NON_NULL",
2737 | "name" : null,
2738 | "ofType" : {
2739 | "kind" : "SCALAR",
2740 | "name" : "Boolean",
2741 | "ofType" : null
2742 | }
2743 | },
2744 | "defaultValue" : null
2745 | } ],
2746 | "onOperation" : false,
2747 | "onFragment" : true,
2748 | "onField" : true
2749 | }, {
2750 | "name" : "skip",
2751 | "description" : "Directs the executor to skip this field or fragment when the `if`'argument is true.",
2752 | "locations" : [ "FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT" ],
2753 | "args" : [ {
2754 | "name" : "if",
2755 | "description" : "Skipped when true.",
2756 | "type" : {
2757 | "kind" : "NON_NULL",
2758 | "name" : null,
2759 | "ofType" : {
2760 | "kind" : "SCALAR",
2761 | "name" : "Boolean",
2762 | "ofType" : null
2763 | }
2764 | },
2765 | "defaultValue" : null
2766 | } ],
2767 | "onOperation" : false,
2768 | "onFragment" : true,
2769 | "onField" : true
2770 | }, {
2771 | "name" : "defer",
2772 | "description" : "This directive allows results to be deferred during execution",
2773 | "locations" : [ "FIELD" ],
2774 | "args" : [ ],
2775 | "onOperation" : false,
2776 | "onFragment" : false,
2777 | "onField" : true
2778 | }, {
2779 | "name" : "deprecated",
2780 | "description" : null,
2781 | "locations" : [ "FIELD_DEFINITION", "ENUM_VALUE" ],
2782 | "args" : [ {
2783 | "name" : "reason",
2784 | "description" : null,
2785 | "type" : {
2786 | "kind" : "SCALAR",
2787 | "name" : "String",
2788 | "ofType" : null
2789 | },
2790 | "defaultValue" : "\"No longer supported\""
2791 | } ],
2792 | "onOperation" : false,
2793 | "onFragment" : false,
2794 | "onField" : false
2795 | }, {
2796 | "name" : "aws_subscribe",
2797 | "description" : "Tells the service which mutation triggers this subscription.",
2798 | "locations" : [ "FIELD_DEFINITION" ],
2799 | "args" : [ {
2800 | "name" : "mutations",
2801 | "description" : "List of mutations which will trigger this subscription when they are called.",
2802 | "type" : {
2803 | "kind" : "LIST",
2804 | "name" : null,
2805 | "ofType" : {
2806 | "kind" : "SCALAR",
2807 | "name" : "String",
2808 | "ofType" : null
2809 | }
2810 | },
2811 | "defaultValue" : null
2812 | } ],
2813 | "onOperation" : false,
2814 | "onFragment" : false,
2815 | "onField" : false
2816 | }, {
2817 | "name" : "aws_auth",
2818 | "description" : "Directs the schema to enforce authorization on a field",
2819 | "locations" : [ "FIELD_DEFINITION" ],
2820 | "args" : [ {
2821 | "name" : "cognito_groups",
2822 | "description" : "List of cognito user pool groups which have access on this field",
2823 | "type" : {
2824 | "kind" : "LIST",
2825 | "name" : null,
2826 | "ofType" : {
2827 | "kind" : "SCALAR",
2828 | "name" : "String",
2829 | "ofType" : null
2830 | }
2831 | },
2832 | "defaultValue" : null
2833 | } ],
2834 | "onOperation" : false,
2835 | "onFragment" : false,
2836 | "onField" : false
2837 | }, {
2838 | "name" : "aws_publish",
2839 | "description" : "Tells the service which subscriptions will be published to when this mutation is called. This directive is deprecated use @aws_susbscribe directive instead.",
2840 | "locations" : [ "FIELD_DEFINITION" ],
2841 | "args" : [ {
2842 | "name" : "subscriptions",
2843 | "description" : "List of subscriptions which will be published to when this mutation is called.",
2844 | "type" : {
2845 | "kind" : "LIST",
2846 | "name" : null,
2847 | "ofType" : {
2848 | "kind" : "SCALAR",
2849 | "name" : "String",
2850 | "ofType" : null
2851 | }
2852 | },
2853 | "defaultValue" : null
2854 | } ],
2855 | "onOperation" : false,
2856 | "onFragment" : false,
2857 | "onField" : false
2858 | } ]
2859 | }
2860 | }
2861 | }
--------------------------------------------------------------------------------