├── .expo-shared
└── assets.json
├── .gitignore
├── .graphqlconfig.yml
├── .vscode
└── settings.json
├── App.js
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── amplify
├── .config
│ └── project-config.json
├── README.md
├── backend
│ ├── api
│ │ └── mobileloc
│ │ │ ├── parameters.json
│ │ │ ├── resolvers
│ │ │ └── README.md
│ │ │ ├── schema.graphql
│ │ │ ├── stacks
│ │ │ └── CustomResources.json
│ │ │ └── transform.conf.json
│ ├── backend-config.json
│ ├── function
│ │ └── updateLocation
│ │ │ ├── amplify.state
│ │ │ ├── function-parameters.json
│ │ │ ├── src
│ │ │ ├── event.json
│ │ │ ├── index.js
│ │ │ ├── package-lock.json
│ │ │ └── package.json
│ │ │ └── updateLocation-cloudformation-template.json
│ └── tags.json
├── cli.json
└── team-provider-info.json
├── app.json
├── assets
├── adaptive-icon.png
├── favicon.png
├── icon.png
└── splash.png
├── babel.config.js
├── components
└── header.js
├── package-lock.json
├── package.json
├── routes
├── mainStack.js
├── setupStack.js
└── tabNavigator.js
├── screens
├── main.js
└── setup.js
├── solution.png
└── src
├── device.js
└── graphql
├── mutations.js
├── queries.js
├── schema.json
└── subscriptions.js
/.expo-shared/assets.json:
--------------------------------------------------------------------------------
1 | {
2 | "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true,
3 | "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true
4 | }
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | .expo/
3 | npm-debug.*
4 | *.jks
5 | *.p8
6 | *.p12
7 | *.key
8 | *.mobileprovision
9 | *.orig.*
10 | web-build/
11 |
12 | # macOS
13 | .DS_Store
14 |
15 | #amplify
16 | amplify/\#current-cloud-backend
17 | amplify/.config/local-*
18 | amplify/logs
19 | amplify/mock-data
20 | amplify/backend/amplify-meta.json
21 | amplify/backend/awscloudformation
22 | amplify/backend/.temp
23 | build/
24 | dist/
25 | node_modules/
26 | aws-exports.js
27 | awsconfiguration.json
28 | amplifyconfiguration.json
29 | amplifyconfiguration.dart
30 | amplify-build-config.json
31 | amplify-gradle-config.json
32 | amplifytools.xcconfig
33 | .secret-*
--------------------------------------------------------------------------------
/.graphqlconfig.yml:
--------------------------------------------------------------------------------
1 | projects:
2 | mobileloc:
3 | schemaPath: src/graphql/schema.json
4 | includes:
5 | - src/graphql/**/*.js
6 | excludes:
7 | - ./amplify/**
8 | extensions:
9 | amplify:
10 | codeGenTarget: javascript
11 | generatedFileName: ''
12 | docsFilePath: src/graphql
13 | extensions:
14 | amplify:
15 | version: 3
16 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.exclude": {
3 | "amplify/.config": true,
4 | "amplify/**/*-parameters.json": true,
5 | "amplify/**/amplify.state": true,
6 | "amplify/**/transform.conf.json": true,
7 | "amplify/#current-cloud-backend": true,
8 | "amplify/backend/amplify-meta.json": true,
9 | "amplify/backend/awscloudformation": true
10 | }
11 | }
--------------------------------------------------------------------------------
/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Navigator from './routes/tabNavigator';
3 |
4 | export default function App() {
5 | return (
6 |
7 | );
8 | }
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | ## Code of Conduct
2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4 | opensource-codeofconduct@amazon.com with any additional questions or comments.
5 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing Guidelines
2 |
3 | Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
4 | documentation, we greatly value feedback and contributions from our community.
5 |
6 | Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
7 | information to effectively respond to your bug report or contribution.
8 |
9 |
10 | ## Reporting Bugs/Feature Requests
11 |
12 | We welcome you to use the GitHub issue tracker to report bugs or suggest features.
13 |
14 | When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
15 | reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
16 |
17 | * A reproducible test case or series of steps
18 | * The version of our code being used
19 | * Any modifications you've made relevant to the bug
20 | * Anything unusual about your environment or deployment
21 |
22 |
23 | ## Contributing via Pull Requests
24 | Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
25 |
26 | 1. You are working against the latest source on the *main* branch.
27 | 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
28 | 3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
29 |
30 | To send us a pull request, please:
31 |
32 | 1. Fork the repository.
33 | 2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
34 | 3. Ensure local tests pass.
35 | 4. Commit to your fork using clear commit messages.
36 | 5. Send us a pull request, answering any default questions in the pull request interface.
37 | 6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
38 |
39 | GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
40 | [creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
41 |
42 |
43 | ## Finding contributions to work on
44 | Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
45 |
46 |
47 | ## Code of Conduct
48 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
49 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
50 | opensource-codeofconduct@amazon.com with any additional questions or comments.
51 |
52 |
53 | ## Security issue notifications
54 | If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
55 |
56 |
57 | ## Licensing
58 |
59 | See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
60 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7 | the Software, and to permit persons to whom the Software is furnished to do so.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 |
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # React-Native Mobile Tracking App
2 |
3 | Demonstrates the basics of using AWS Amplify to integrate with Amazon Location Service tracker in a javascript react-natvie cross-platform mobile app.
4 |
5 | The Expo framework has been used to scafold the cross-platform mobile app with react-native.
6 |
7 |
8 | ## Solution
9 |
10 | 
11 |
12 | AWS Amplify is used to create a GraphQL API, using AWS AppSync and backed by Amazon DynamoDB, in order to register a mobile device with the solution and track the mobile location through Amazon Location Service.
13 |
14 | AWS Amplify Add Function (AWS Lambda) is used as an AppSync data source to send the Location data to the Amazon Location Service tracker.
15 |
16 | ## Security
17 |
18 | See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
19 |
20 | ## License
21 |
22 | This library is licensed under the MIT-0 License. See the LICENSE file.
23 |
24 |
--------------------------------------------------------------------------------
/amplify/.config/project-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "projectName": "mobileLoc",
3 | "version": "3.1",
4 | "frontend": "javascript",
5 | "javascript": {
6 | "framework": "react-native",
7 | "config": {
8 | "SourceDir": "src",
9 | "DistributionDir": "/",
10 | "BuildCommand": "npm.cmd run-script build",
11 | "StartCommand": "npm.cmd run-script start"
12 | }
13 | },
14 | "providers": [
15 | "awscloudformation"
16 | ]
17 | }
--------------------------------------------------------------------------------
/amplify/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Amplify CLI
2 | This directory was generated by [Amplify CLI](https://docs.amplify.aws/cli).
3 |
4 | Helpful resources:
5 | - Amplify documentation: https://docs.amplify.aws
6 | - Amplify CLI documentation: https://docs.amplify.aws/cli
7 | - More details on this folder & generated files: https://docs.amplify.aws/cli/reference/files
8 | - Join Amplify's community: https://amplify.aws/community/
9 |
--------------------------------------------------------------------------------
/amplify/backend/api/mobileloc/parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "AppSyncApiName": "mobileloc",
3 | "DynamoDBBillingMode": "PAY_PER_REQUEST",
4 | "DynamoDBEnableServerSideEncryption": false
5 | }
--------------------------------------------------------------------------------
/amplify/backend/api/mobileloc/resolvers/README.md:
--------------------------------------------------------------------------------
1 | Any resolvers that you add in this directory will override the ones automatically generated by Amplify CLI and will be directly copied to the cloud.
2 | For more information, visit [https://docs.amplify.aws/cli/graphql-transformer/resolvers](https://docs.amplify.aws/cli/graphql-transformer/resolvers)
--------------------------------------------------------------------------------
/amplify/backend/api/mobileloc/schema.graphql:
--------------------------------------------------------------------------------
1 | type Device @model {
2 | id: ID!
3 | name: String!
4 | trackerName: String!
5 | latitude: String
6 | longitude: String
7 | }
8 |
9 | type Mutation {
10 | updateLocation(trackerName: String, deviceId: String, Latitude: String, Longitude: String): String @function(name: "updateLocation-${env}")
11 | }
--------------------------------------------------------------------------------
/amplify/backend/api/mobileloc/stacks/CustomResources.json:
--------------------------------------------------------------------------------
1 | {
2 | "AWSTemplateFormatVersion": "2010-09-09",
3 | "Description": "An auto-generated nested stack.",
4 | "Metadata": {},
5 | "Parameters": {
6 | "AppSyncApiId": {
7 | "Type": "String",
8 | "Description": "The id of the AppSync API associated with this project."
9 | },
10 | "AppSyncApiName": {
11 | "Type": "String",
12 | "Description": "The name of the AppSync API",
13 | "Default": "AppSyncSimpleTransform"
14 | },
15 | "env": {
16 | "Type": "String",
17 | "Description": "The environment name. e.g. Dev, Test, or Production",
18 | "Default": "NONE"
19 | },
20 | "S3DeploymentBucket": {
21 | "Type": "String",
22 | "Description": "The S3 bucket containing all deployment assets for the project."
23 | },
24 | "S3DeploymentRootKey": {
25 | "Type": "String",
26 | "Description": "An S3 key relative to the S3DeploymentBucket that points to the root\nof the deployment directory."
27 | }
28 | },
29 | "Resources": {
30 | "EmptyResource": {
31 | "Type": "Custom::EmptyResource",
32 | "Condition": "AlwaysFalse"
33 | }
34 | },
35 | "Conditions": {
36 | "HasEnvironmentParameter": {
37 | "Fn::Not": [
38 | {
39 | "Fn::Equals": [
40 | {
41 | "Ref": "env"
42 | },
43 | "NONE"
44 | ]
45 | }
46 | ]
47 | },
48 | "AlwaysFalse": {
49 | "Fn::Equals": ["true", "false"]
50 | }
51 | },
52 | "Outputs": {
53 | "EmptyOutput": {
54 | "Description": "An empty output. You may delete this if you have at least one resource above.",
55 | "Value": ""
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/amplify/backend/api/mobileloc/transform.conf.json:
--------------------------------------------------------------------------------
1 | {
2 | "Version": 5,
3 | "ElasticsearchWarning": true
4 | }
--------------------------------------------------------------------------------
/amplify/backend/backend-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "api": {
3 | "mobileloc": {
4 | "service": "AppSync",
5 | "providerPlugin": "awscloudformation",
6 | "output": {
7 | "authConfig": {
8 | "defaultAuthentication": {
9 | "authenticationType": "API_KEY",
10 | "apiKeyConfig": {
11 | "apiKeyExpirationDays": 365,
12 | "description": "public"
13 | }
14 | },
15 | "additionalAuthenticationProviders": []
16 | }
17 | }
18 | }
19 | },
20 | "function": {
21 | "updateLocation": {
22 | "build": true,
23 | "providerPlugin": "awscloudformation",
24 | "service": "Lambda"
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/amplify/backend/function/updateLocation/amplify.state:
--------------------------------------------------------------------------------
1 | {
2 | "pluginId": "amplify-nodejs-function-runtime-provider",
3 | "functionRuntime": "nodejs",
4 | "useLegacyBuild": true,
5 | "defaultEditorFile": "src\\index.js"
6 | }
--------------------------------------------------------------------------------
/amplify/backend/function/updateLocation/function-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "lambdaLayers": []
3 | }
--------------------------------------------------------------------------------
/amplify/backend/function/updateLocation/src/event.json:
--------------------------------------------------------------------------------
1 | {
2 | "key1": "value1",
3 | "key2": "value2",
4 | "key3": "value3"
5 | }
6 |
--------------------------------------------------------------------------------
/amplify/backend/function/updateLocation/src/index.js:
--------------------------------------------------------------------------------
1 | var AWS = require('aws-sdk');
2 |
3 | exports.handler = async (event) => {
4 |
5 | var location = new AWS.Location();
6 | console.log("update loc");
7 |
8 | var params = {
9 | TrackerName: event.arguments.trackerName, /* required */
10 | Updates: [ /* required */
11 | {
12 | DeviceId: `${event.arguments.deviceId}`, /* required */
13 | Position: [ /* required */
14 | parseFloat(event.arguments.Longitude),
15 | parseFloat(event.arguments.Latitude)
16 | /* more items */
17 | ],
18 | SampleTime: new Date || 123456789 /* required */
19 | },
20 | /* more items */
21 | ]
22 | };
23 |
24 | try{
25 | const data = await location.batchUpdateDevicePosition(params).promise();
26 | console.log(data); // successful response
27 | console.log("update loc: success");
28 | } catch (err){
29 | console.log("update loc: error");
30 | console.log(err);
31 | }
32 |
33 | return params
34 | };
35 |
--------------------------------------------------------------------------------
/amplify/backend/function/updateLocation/src/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "updateLocation",
3 | "version": "2.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "aws-sdk": {
8 | "version": "2.931.0",
9 | "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.931.0.tgz",
10 | "integrity": "sha512-Db97/aJq8zYl8mHzY6dNO6m9S89TqN4HEUUc2aCYQCTyMb/eNrjf+uZTnutnQbJkClqHzxFcWc3aqe5VlTac/A==",
11 | "requires": {
12 | "buffer": "4.9.2",
13 | "events": "1.1.1",
14 | "ieee754": "1.1.13",
15 | "jmespath": "0.15.0",
16 | "querystring": "0.2.0",
17 | "sax": "1.2.1",
18 | "url": "0.10.3",
19 | "uuid": "3.3.2",
20 | "xml2js": "0.4.19"
21 | }
22 | },
23 | "base64-js": {
24 | "version": "1.5.1",
25 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
26 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
27 | },
28 | "buffer": {
29 | "version": "4.9.2",
30 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz",
31 | "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==",
32 | "requires": {
33 | "base64-js": "^1.0.2",
34 | "ieee754": "^1.1.4",
35 | "isarray": "^1.0.0"
36 | }
37 | },
38 | "events": {
39 | "version": "1.1.1",
40 | "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
41 | "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ="
42 | },
43 | "ieee754": {
44 | "version": "1.1.13",
45 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
46 | "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
47 | },
48 | "isarray": {
49 | "version": "1.0.0",
50 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
51 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
52 | },
53 | "jmespath": {
54 | "version": "0.15.0",
55 | "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz",
56 | "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc="
57 | },
58 | "punycode": {
59 | "version": "1.3.2",
60 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
61 | "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0="
62 | },
63 | "querystring": {
64 | "version": "0.2.0",
65 | "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
66 | "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA="
67 | },
68 | "sax": {
69 | "version": "1.2.1",
70 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
71 | "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
72 | },
73 | "url": {
74 | "version": "0.10.3",
75 | "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz",
76 | "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=",
77 | "requires": {
78 | "punycode": "1.3.2",
79 | "querystring": "0.2.0"
80 | }
81 | },
82 | "uuid": {
83 | "version": "3.3.2",
84 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
85 | "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
86 | },
87 | "xml2js": {
88 | "version": "0.4.19",
89 | "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
90 | "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
91 | "requires": {
92 | "sax": ">=0.6.0",
93 | "xmlbuilder": "~9.0.1"
94 | }
95 | },
96 | "xmlbuilder": {
97 | "version": "9.0.7",
98 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
99 | "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
100 | }
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/amplify/backend/function/updateLocation/src/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "updateLocation",
3 | "version": "2.0.0",
4 | "description": "Lambda function generated by Amplify",
5 | "main": "index.js",
6 | "license": "Apache-2.0",
7 | "dependencies": {
8 | "aws-sdk": "^2.931.0"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/amplify/backend/function/updateLocation/updateLocation-cloudformation-template.json:
--------------------------------------------------------------------------------
1 | {
2 | "AWSTemplateFormatVersion": "2010-09-09",
3 | "Description": "Lambda Function resource stack creation using Amplify CLI",
4 | "Parameters": {
5 | "CloudWatchRule": {
6 | "Type": "String",
7 | "Default": "NONE",
8 | "Description": " Schedule Expression"
9 | },
10 | "deploymentBucketName": {
11 | "Type": "String"
12 | },
13 | "env": {
14 | "Type": "String"
15 | },
16 | "s3Key": {
17 | "Type": "String"
18 | }
19 | },
20 | "Conditions": {
21 | "ShouldNotCreateEnvResources": {
22 | "Fn::Equals": [
23 | {
24 | "Ref": "env"
25 | },
26 | "NONE"
27 | ]
28 | }
29 | },
30 | "Resources": {
31 | "LambdaFunction": {
32 | "Type": "AWS::Lambda::Function",
33 | "Metadata": {
34 | "aws:asset:path": "./src",
35 | "aws:asset:property": "Code"
36 | },
37 | "Properties": {
38 | "Code": {
39 | "S3Bucket": {
40 | "Ref": "deploymentBucketName"
41 | },
42 | "S3Key": {
43 | "Ref": "s3Key"
44 | }
45 | },
46 | "Handler": "index.handler",
47 | "FunctionName": {
48 | "Fn::If": [
49 | "ShouldNotCreateEnvResources",
50 | "updateLocation",
51 | {
52 | "Fn::Join": [
53 | "",
54 | [
55 | "updateLocation",
56 | "-",
57 | {
58 | "Ref": "env"
59 | }
60 | ]
61 | ]
62 | }
63 | ]
64 | },
65 | "Environment": {
66 | "Variables": {
67 | "ENV": {
68 | "Ref": "env"
69 | },
70 | "REGION": {
71 | "Ref": "AWS::Region"
72 | }
73 | }
74 | },
75 | "Role": {
76 | "Fn::GetAtt": [
77 | "LambdaExecutionRole",
78 | "Arn"
79 | ]
80 | },
81 | "Runtime": "nodejs14.x",
82 | "Layers": [],
83 | "Timeout": "25"
84 | }
85 | },
86 | "LambdaExecutionRole": {
87 | "Type": "AWS::IAM::Role",
88 | "Properties": {
89 | "RoleName": {
90 | "Fn::If": [
91 | "ShouldNotCreateEnvResources",
92 | "mobilelocLambdaRole18fee2e6",
93 | {
94 | "Fn::Join": [
95 | "",
96 | [
97 | "mobilelocLambdaRole18fee2e6",
98 | "-",
99 | {
100 | "Ref": "env"
101 | }
102 | ]
103 | ]
104 | }
105 | ]
106 | },
107 | "AssumeRolePolicyDocument": {
108 | "Version": "2012-10-17",
109 | "Statement": [
110 | {
111 | "Effect": "Allow",
112 | "Principal": {
113 | "Service": [
114 | "lambda.amazonaws.com"
115 | ]
116 | },
117 | "Action": [
118 | "sts:AssumeRole"
119 | ]
120 | }
121 | ]
122 | }
123 | }
124 | },
125 | "lambdaexecutionpolicy": {
126 | "DependsOn": [
127 | "LambdaExecutionRole"
128 | ],
129 | "Type": "AWS::IAM::Policy",
130 | "Properties": {
131 | "PolicyName": "lambda-execution-policy",
132 | "Roles": [
133 | {
134 | "Ref": "LambdaExecutionRole"
135 | }
136 | ],
137 | "PolicyDocument": {
138 | "Version": "2012-10-17",
139 | "Statement": [
140 | {
141 | "Effect": "Allow",
142 | "Action": [
143 | "logs:CreateLogGroup",
144 | "logs:CreateLogStream",
145 | "logs:PutLogEvents",
146 | "geo:BatchUpdateDevicePosition"
147 | ],
148 | "Resource": [
149 | {
150 | "Fn::Sub": [
151 | "arn:aws:geo:*:${account}:tracker/*",
152 | {
153 | "account": {
154 | "Ref": "AWS::AccountId"
155 | }
156 | }
157 | ]
158 | },
159 | {
160 | "Fn::Sub": [
161 | "arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*",
162 | {
163 | "region": {
164 | "Ref": "AWS::Region"
165 | },
166 | "account": {
167 | "Ref": "AWS::AccountId"
168 | },
169 | "lambda": {
170 | "Ref": "LambdaFunction"
171 | }
172 | }
173 | ]
174 | }
175 | ]
176 | }
177 | ]
178 | }
179 | }
180 | }
181 | },
182 | "Outputs": {
183 | "Name": {
184 | "Value": {
185 | "Ref": "LambdaFunction"
186 | }
187 | },
188 | "Arn": {
189 | "Value": {
190 | "Fn::GetAtt": [
191 | "LambdaFunction",
192 | "Arn"
193 | ]
194 | }
195 | },
196 | "Region": {
197 | "Value": {
198 | "Ref": "AWS::Region"
199 | }
200 | },
201 | "LambdaExecutionRole": {
202 | "Value": {
203 | "Ref": "LambdaExecutionRole"
204 | }
205 | }
206 | }
207 | }
--------------------------------------------------------------------------------
/amplify/backend/tags.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Key": "user:Stack",
4 | "Value": "{project-env}"
5 | },
6 | {
7 | "Key": "user:Application",
8 | "Value": "{project-name}"
9 | }
10 | ]
--------------------------------------------------------------------------------
/amplify/cli.json:
--------------------------------------------------------------------------------
1 | {
2 | "features": {
3 | "graphqltransformer": {
4 | "addmissingownerfields": true,
5 | "validatetypenamereservedwords": true,
6 | "useexperimentalpipelinedtransformer": false,
7 | "enableiterativegsiupdates": true,
8 | "secondarykeyasgsi": true,
9 | "skipoverridemutationinputtypes": true
10 | },
11 | "frontend-ios": {
12 | "enablexcodeintegration": true
13 | },
14 | "auth": {
15 | "enablecaseinsensitivity": true,
16 | "useinclusiveterminology": true,
17 | "breakcirculardependency": true
18 | },
19 | "codegen": {
20 | "useappsyncmodelgenplugin": true,
21 | "usedocsgeneratorplugin": true,
22 | "usetypesgeneratorplugin": true,
23 | "cleangeneratedmodelsdirectory": true,
24 | "retaincasestyle": true,
25 | "addtimestampfields": true,
26 | "handlelistnullabilitytransparently": true
27 | },
28 | "appsync": {
29 | "generategraphqlpermissions": true
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/amplify/team-provider-info.json:
--------------------------------------------------------------------------------
1 | {
2 | "dev": {
3 | "awscloudformation": {
4 | "AuthRoleName": "amplify-mobileloc-dev-143129-authRole",
5 | "UnauthRoleArn": "arn:aws:iam::117470732045:role/amplify-mobileloc-dev-143129-unauthRole",
6 | "AuthRoleArn": "arn:aws:iam::117470732045:role/amplify-mobileloc-dev-143129-authRole",
7 | "Region": "us-east-1",
8 | "DeploymentBucketName": "amplify-mobileloc-dev-143129-deployment",
9 | "UnauthRoleName": "amplify-mobileloc-dev-143129-unauthRole",
10 | "StackName": "amplify-mobileloc-dev-143129",
11 | "StackId": "arn:aws:cloudformation:us-east-1:117470732045:stack/amplify-mobileloc-dev-143129/4013f7b0-bddb-11eb-876d-0eb23bbe71c5",
12 | "AmplifyAppId": "d21iwh9fokjjql"
13 | },
14 | "categories": {
15 | "function": {
16 | "updateLocation": {
17 | "deploymentBucketName": "amplify-mobileloc-dev-143129-deployment",
18 | "s3Key": "amplify-builds/updateLocation-524d7865382f66696958-build.zip"
19 | }
20 | }
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "expo": {
3 | "name": "mobile",
4 | "slug": "mobile",
5 | "version": "1.0.0",
6 | "orientation": "portrait",
7 | "icon": "./assets/icon.png",
8 | "splash": {
9 | "image": "./assets/splash.png",
10 | "resizeMode": "contain",
11 | "backgroundColor": "#ffffff"
12 | },
13 | "updates": {
14 | "fallbackToCacheTimeout": 0
15 | },
16 | "assetBundlePatterns": [
17 | "**/*"
18 | ],
19 | "ios": {
20 | "supportsTablet": true
21 | },
22 | "android": {
23 | "adaptiveIcon": {
24 | "foregroundImage": "./assets/adaptive-icon.png",
25 | "backgroundColor": "#FFFFFF"
26 | }
27 | },
28 | "web": {
29 | "favicon": "./assets/favicon.png"
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/assets/adaptive-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aws-samples/amazon-location-service-mobile-tracker-react/93c24c5c47e4f37cc131fb71db86b13242ba4984/assets/adaptive-icon.png
--------------------------------------------------------------------------------
/assets/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aws-samples/amazon-location-service-mobile-tracker-react/93c24c5c47e4f37cc131fb71db86b13242ba4984/assets/favicon.png
--------------------------------------------------------------------------------
/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aws-samples/amazon-location-service-mobile-tracker-react/93c24c5c47e4f37cc131fb71db86b13242ba4984/assets/icon.png
--------------------------------------------------------------------------------
/assets/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aws-samples/amazon-location-service-mobile-tracker-react/93c24c5c47e4f37cc131fb71db86b13242ba4984/assets/splash.png
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = function(api) {
2 | api.cache(true);
3 | return {
4 | presets: ['babel-preset-expo'],
5 | };
6 | };
7 |
--------------------------------------------------------------------------------
/components/header.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StyleSheet, Text, View } from 'react-native';
3 |
4 | export default function Header({title}) {
5 | return (
6 |
7 |
8 | {title}
9 |
10 |
11 | )
12 | }
13 |
14 | const styles = StyleSheet.create({
15 | header:{
16 | width: '100%',
17 | height: '100%',
18 | flexDirection: 'row',
19 | alignItems: 'center',
20 | justifyContent: 'center'
21 | },
22 | headerText: {
23 | fontWeight: 'bold',
24 | fontSize: 20,
25 | color: '#333',
26 | letterSpacing: 1
27 | },
28 | })
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "node_modules/expo/AppEntry.js",
3 | "scripts": {
4 | "start": "expo start",
5 | "android": "expo start --android",
6 | "ios": "expo start --ios",
7 | "web": "expo start --web",
8 | "eject": "expo eject"
9 | },
10 | "dependencies": {
11 | "@react-native-async-storage/async-storage": "^1.13.0",
12 | "@react-native-community/netinfo": "6.0.0",
13 | "aws-amplify": "^4.3.37",
14 | "aws-amplify-react-native": "^5.0.0",
15 | "expo": "~46.0.16",
16 | "expo-file-system": "~11.0.2",
17 | "expo-location": "~12.0.4",
18 | "expo-status-bar": "~1.0.4",
19 | "react": "16.13.1",
20 | "react-dom": "16.13.1",
21 | "react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
22 | "react-native-gesture-handler": "~1.10.2",
23 | "react-native-reanimated": "~2.10.0",
24 | "react-native-screens": "~3.0.0",
25 | "react-native-web": "~0.18.9",
26 | "react-navigation": "^4.4.4",
27 | "react-navigation-stack": "^2.10.4",
28 | "react-navigation-tabs": "^2.11.1"
29 | },
30 | "devDependencies": {
31 | "@babel/core": "~7.9.0"
32 | },
33 | "private": true
34 | }
35 |
--------------------------------------------------------------------------------
/routes/mainStack.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { createStackNavigator } from 'react-navigation-stack';
3 | import Header from '../components/header';
4 | import Main from '../screens/main';
5 |
6 | const screens = {
7 | Home: {
8 | screen: Main,
9 | navigationOptions: () => {
10 | return {
11 | headerTitle: () =>
12 | }
13 | }
14 | }
15 | }
16 |
17 | const MainStack = createStackNavigator(screens, {
18 | defaultNavigationOptions: {
19 | headerTintColor: '#444',
20 | headerStyle: { backgroundColor: '#eee' }
21 | }
22 | });
23 |
24 | export default MainStack;
--------------------------------------------------------------------------------
/routes/setupStack.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { createStackNavigator } from 'react-navigation-stack';
3 | import Header from '../components/header';
4 | import Setup from '../screens/setup';
5 |
6 | const screens = {
7 | Setup: {
8 | screen: Setup,
9 | navigationOptions: () => {
10 | return {
11 | headerTitle: () =>
12 | }
13 | }
14 | }
15 | }
16 |
17 | const SetupStack = createStackNavigator(screens, {
18 | defaultNavigationOptions: {
19 | headerTintColor: '#444',
20 | headerStyle: { backgroundColor: '#eee' }
21 | }
22 | });
23 |
24 | export default SetupStack;
--------------------------------------------------------------------------------
/routes/tabNavigator.js:
--------------------------------------------------------------------------------
1 | import { createBottomTabNavigator } from 'react-navigation-tabs';
2 | import { createAppContainer } from 'react-navigation';
3 | import MainStack from './mainStack';
4 | import SetupStack from './setupStack';
5 |
6 | const TabNavigator = createBottomTabNavigator ({
7 | Home: {
8 | screen: MainStack
9 | },
10 | Setup: {
11 | screen: SetupStack
12 | }
13 | })
14 |
15 | export default createAppContainer(TabNavigator);
--------------------------------------------------------------------------------
/screens/main.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react';
2 | import { Text, View, Button, Alert } from 'react-native';
3 | import * as Location from 'expo-location';
4 | import Device from '../src/device';
5 |
6 | const deviceSvc = new Device();
7 |
8 | export default function Main() {
9 | const [location, setLocation] = useState(null);
10 | const [errorMsg, setErrorMsg] = useState(null);
11 | const [tracker, setTracker] = useState("");
12 | const [deviceName, setDeviceName] = useState("");
13 | const [deviceId, setDeviceId] = useState("");
14 |
15 | useEffect(() => {
16 |
17 | (async () => {
18 |
19 | deviceSvc.init()
20 | .then((resp)=> {
21 | if(resp !== null){
22 | setTracker(resp.trackerName);
23 | setDeviceName(resp.name);
24 | setDeviceId(resp.id);
25 | }
26 | });
27 |
28 | let { status } = await Location.requestForegroundPermissionsAsync();
29 | if (status !== 'granted') {
30 | setErrorMsg('Permission to access location was denied');
31 | return;
32 | } else {
33 |
34 | let isLocationServicesEnabled = await Location.hasServicesEnabledAsync();
35 | let locationProviderStatus = await Location.getProviderStatusAsync();
36 | console.log(`loc status: ${JSON.stringify(locationProviderStatus)}`);
37 |
38 | if(isLocationServicesEnabled){
39 | //Get loc
40 | let loc = await Location.getCurrentPositionAsync({accuracy: Location.Accuracy.Highest});
41 | if(loc.coords !== null){
42 | console.log(`loc: ${JSON.stringify(loc)}`);
43 | setLocation(loc);
44 | deviceSvc.setLocation(loc.coords.latitude, loc.coords.longitude);
45 | }
46 |
47 | //Watch loc
48 | await Location.watchPositionAsync({
49 | enableHighAccuracy: true,
50 | distanceInterval: 1,
51 | timeInterval: 30000}, newLoc => {
52 | console.log(`new loc: ${JSON.stringify(newLoc)}`);
53 | setLocation(newLoc);
54 | deviceSvc.setLocation(newLoc.coords.latitude, newLoc.coords.longitude);
55 | });
56 | }
57 | }
58 |
59 | })();
60 |
61 | }, []);
62 |
63 | let text = 'Waiting..';
64 | if (errorMsg) {
65 | text = errorMsg;
66 | } else if (location) {
67 | text = "";//JSON.stringify(location);
68 | }
69 |
70 | return (
71 |
72 | Device Name: {deviceName}
73 | Device ID: {deviceId}
74 | Tracker: {tracker}
75 | Lat: {location?.coords?.latitude}
76 | Lon: {location?.coords?.longitude}
77 | {text}
78 |
79 | );
80 | }
--------------------------------------------------------------------------------
/screens/setup.js:
--------------------------------------------------------------------------------
1 | import React, {useState, useEffect} from 'react';
2 | import { Text, View, TextInput, Button, Alert, TouchableWithoutFeedback, Keyboard } from 'react-native';
3 | import Device from '../src/device';
4 |
5 | const deviceSvc = new Device();
6 |
7 | export default function Setup() {
8 | const [tracker, setTracker] = useState("");
9 | const [device, setDevice] = useState("");
10 | const [label, setLabel] = useState("Register");
11 |
12 | useEffect(() => {
13 | deviceSvc.init()
14 | .then((resp)=> {
15 | if(resp !== null){
16 | setTracker(resp.trackerName);
17 | setDevice(resp.name);
18 | setLabel("Update");
19 | }
20 | })
21 |
22 | }, []);
23 |
24 | const updateHandler = () => {
25 | const valid = /^[a-zA-Z0-9_\-\.]+$/;
26 | if(valid.test(tracker) && valid.test(device)){
27 | Keyboard.dismiss();
28 | deviceSvc.register(device, tracker);
29 |
30 | } else {
31 | Alert.alert('Validation', 'Use only letters, numbers, hyphens, or underscores with no spaces.', [
32 | {text: 'OK', onPress: () => console.log('validation alert closed')}
33 | ]);
34 | }
35 | }
36 |
37 | return (
38 | {
39 | Keyboard.dismiss();
40 | }}>
41 |
42 | Device Name:
43 | setDevice(val)}
46 | value={device} />
47 | Tracker Name:
48 | setTracker(val)}
51 | value={tracker} />
52 |
53 |
54 |
55 |
56 |
57 | );
58 | }
--------------------------------------------------------------------------------
/solution.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aws-samples/amazon-location-service-mobile-tracker-react/93c24c5c47e4f37cc131fb71db86b13242ba4984/solution.png
--------------------------------------------------------------------------------
/src/device.js:
--------------------------------------------------------------------------------
1 | import * as FileSystem from 'expo-file-system';
2 | //Amplify
3 | import Amplify, { API, graphqlOperation } from 'aws-amplify'
4 | import config from './aws-exports'
5 | import { createDevice, updateDevice, updateLocation } from './graphql/mutations';
6 | import { getDevice } from './graphql/queries'
7 |
8 | Amplify.configure(config)
9 |
10 | export default class Device{
11 | constructor(){
12 | this.fileName = `${FileSystem.documentDirectory}app.json`;
13 | this.id = "0";
14 | this.trackerName = "";
15 |
16 | }
17 |
18 | async read() {
19 | try{
20 | const { exists } = await FileSystem.getInfoAsync(this.fileName);
21 | if (!exists) await this.write({id:"0"});
22 | if (exists) {
23 | let data = await FileSystem.readAsStringAsync(this.fileName);
24 | return (data !== null && data !== "") ? JSON.parse(data) : null;
25 | }
26 | }
27 | catch (err) {
28 | console.log(err);
29 | }
30 | }
31 |
32 | async write(content){
33 | await FileSystem.writeAsStringAsync(this.fileName, JSON.stringify(content));
34 | }
35 |
36 |
37 |
38 | async register(name,trackerName){
39 | console.log(`id==${this.id}`)
40 | console.log(typeof this.id);
41 | if(this.id == "0"){
42 | console.log('create');
43 | await this.create(name, trackerName);
44 | } else {
45 | console.log(`update`);
46 | await this.update(this.id, name, trackerName);
47 | }
48 | }
49 |
50 | async create(name,trackerName){
51 | let resp = await API.graphql(graphqlOperation(createDevice, {input: {name, trackerName}}));
52 | console.log(`create ${resp}`);
53 | this.id = resp.data.createDevice.id.toString();
54 | await this.write({id: this.id});
55 | }
56 |
57 | async update(id, name, trackerName){
58 | console.log(`id: ${id}, name: ${name}, tracker: ${trackerName}`);
59 | let resp = await API.graphql(graphqlOperation(updateDevice, {input: {id, name, trackerName}}));
60 | }
61 |
62 | async init(){
63 | let data = await this.read();
64 | if(data !== null){
65 | this.id = data.id.toString();
66 | if(this.id !== "0"){
67 | let resp = await API.graphql(graphqlOperation(getDevice, {id: this.id}));
68 | this.trackerName = resp.data.getDevice.trackerName;
69 | return (resp !== null && resp !== undefined) ? resp.data.getDevice : null;
70 | } else {
71 | return null;
72 | }
73 | } else {
74 | await this.write({id: "0"});
75 | }
76 |
77 | }
78 |
79 | async setLocation(lat, lon){
80 | return await API.graphql(graphqlOperation(updateLocation, { trackerName: this.trackerName, deviceId: this.id, Latitude: lat, Longitude: lon }));
81 | }
82 |
83 |
84 | }
--------------------------------------------------------------------------------
/src/graphql/mutations.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | // this is an auto generated file. This will be overwritten
3 |
4 | export const updateLocation = /* GraphQL */ `
5 | mutation UpdateLocation(
6 | $trackerName: String
7 | $deviceId: String
8 | $Latitude: String
9 | $Longitude: String
10 | ) {
11 | updateLocation(
12 | trackerName: $trackerName
13 | deviceId: $deviceId
14 | Latitude: $Latitude
15 | Longitude: $Longitude
16 | )
17 | }
18 | `;
19 | export const createDevice = /* GraphQL */ `
20 | mutation CreateDevice(
21 | $input: CreateDeviceInput!
22 | $condition: ModelDeviceConditionInput
23 | ) {
24 | createDevice(input: $input, condition: $condition) {
25 | id
26 | name
27 | trackerName
28 | latitude
29 | longitude
30 | createdAt
31 | updatedAt
32 | }
33 | }
34 | `;
35 | export const updateDevice = /* GraphQL */ `
36 | mutation UpdateDevice(
37 | $input: UpdateDeviceInput!
38 | $condition: ModelDeviceConditionInput
39 | ) {
40 | updateDevice(input: $input, condition: $condition) {
41 | id
42 | name
43 | trackerName
44 | latitude
45 | longitude
46 | createdAt
47 | updatedAt
48 | }
49 | }
50 | `;
51 | export const deleteDevice = /* GraphQL */ `
52 | mutation DeleteDevice(
53 | $input: DeleteDeviceInput!
54 | $condition: ModelDeviceConditionInput
55 | ) {
56 | deleteDevice(input: $input, condition: $condition) {
57 | id
58 | name
59 | trackerName
60 | latitude
61 | longitude
62 | createdAt
63 | updatedAt
64 | }
65 | }
66 | `;
67 |
--------------------------------------------------------------------------------
/src/graphql/queries.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | // this is an auto generated file. This will be overwritten
3 |
4 | export const getDevice = /* GraphQL */ `
5 | query GetDevice($id: ID!) {
6 | getDevice(id: $id) {
7 | id
8 | name
9 | trackerName
10 | latitude
11 | longitude
12 | createdAt
13 | updatedAt
14 | }
15 | }
16 | `;
17 | export const listDevices = /* GraphQL */ `
18 | query ListDevices(
19 | $filter: ModelDeviceFilterInput
20 | $limit: Int
21 | $nextToken: String
22 | ) {
23 | listDevices(filter: $filter, limit: $limit, nextToken: $nextToken) {
24 | items {
25 | id
26 | name
27 | trackerName
28 | latitude
29 | longitude
30 | createdAt
31 | updatedAt
32 | }
33 | nextToken
34 | }
35 | }
36 | `;
37 |
--------------------------------------------------------------------------------
/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" : "getDevice",
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" : "Device",
37 | "ofType" : null
38 | },
39 | "isDeprecated" : false,
40 | "deprecationReason" : null
41 | }, {
42 | "name" : "listDevices",
43 | "description" : null,
44 | "args" : [ {
45 | "name" : "filter",
46 | "description" : null,
47 | "type" : {
48 | "kind" : "INPUT_OBJECT",
49 | "name" : "ModelDeviceFilterInput",
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" : "ModelDeviceConnection",
75 | "ofType" : null
76 | },
77 | "isDeprecated" : false,
78 | "deprecationReason" : null
79 | } ],
80 | "inputFields" : null,
81 | "interfaces" : [ ],
82 | "enumValues" : null,
83 | "possibleTypes" : null
84 | }, {
85 | "kind" : "OBJECT",
86 | "name" : "Device",
87 | "description" : null,
88 | "fields" : [ {
89 | "name" : "id",
90 | "description" : null,
91 | "args" : [ ],
92 | "type" : {
93 | "kind" : "NON_NULL",
94 | "name" : null,
95 | "ofType" : {
96 | "kind" : "SCALAR",
97 | "name" : "ID",
98 | "ofType" : null
99 | }
100 | },
101 | "isDeprecated" : false,
102 | "deprecationReason" : null
103 | }, {
104 | "name" : "name",
105 | "description" : null,
106 | "args" : [ ],
107 | "type" : {
108 | "kind" : "NON_NULL",
109 | "name" : null,
110 | "ofType" : {
111 | "kind" : "SCALAR",
112 | "name" : "String",
113 | "ofType" : null
114 | }
115 | },
116 | "isDeprecated" : false,
117 | "deprecationReason" : null
118 | }, {
119 | "name" : "trackerName",
120 | "description" : null,
121 | "args" : [ ],
122 | "type" : {
123 | "kind" : "NON_NULL",
124 | "name" : null,
125 | "ofType" : {
126 | "kind" : "SCALAR",
127 | "name" : "String",
128 | "ofType" : null
129 | }
130 | },
131 | "isDeprecated" : false,
132 | "deprecationReason" : null
133 | }, {
134 | "name" : "latitude",
135 | "description" : null,
136 | "args" : [ ],
137 | "type" : {
138 | "kind" : "SCALAR",
139 | "name" : "String",
140 | "ofType" : null
141 | },
142 | "isDeprecated" : false,
143 | "deprecationReason" : null
144 | }, {
145 | "name" : "longitude",
146 | "description" : null,
147 | "args" : [ ],
148 | "type" : {
149 | "kind" : "SCALAR",
150 | "name" : "String",
151 | "ofType" : null
152 | },
153 | "isDeprecated" : false,
154 | "deprecationReason" : null
155 | }, {
156 | "name" : "createdAt",
157 | "description" : null,
158 | "args" : [ ],
159 | "type" : {
160 | "kind" : "NON_NULL",
161 | "name" : null,
162 | "ofType" : {
163 | "kind" : "SCALAR",
164 | "name" : "AWSDateTime",
165 | "ofType" : null
166 | }
167 | },
168 | "isDeprecated" : false,
169 | "deprecationReason" : null
170 | }, {
171 | "name" : "updatedAt",
172 | "description" : null,
173 | "args" : [ ],
174 | "type" : {
175 | "kind" : "NON_NULL",
176 | "name" : null,
177 | "ofType" : {
178 | "kind" : "SCALAR",
179 | "name" : "AWSDateTime",
180 | "ofType" : null
181 | }
182 | },
183 | "isDeprecated" : false,
184 | "deprecationReason" : null
185 | } ],
186 | "inputFields" : null,
187 | "interfaces" : [ ],
188 | "enumValues" : null,
189 | "possibleTypes" : null
190 | }, {
191 | "kind" : "SCALAR",
192 | "name" : "ID",
193 | "description" : "Built-in ID",
194 | "fields" : null,
195 | "inputFields" : null,
196 | "interfaces" : null,
197 | "enumValues" : null,
198 | "possibleTypes" : null
199 | }, {
200 | "kind" : "SCALAR",
201 | "name" : "String",
202 | "description" : "Built-in String",
203 | "fields" : null,
204 | "inputFields" : null,
205 | "interfaces" : null,
206 | "enumValues" : null,
207 | "possibleTypes" : null
208 | }, {
209 | "kind" : "SCALAR",
210 | "name" : "AWSDateTime",
211 | "description" : "The `AWSDateTime` scalar type provided by AWS AppSync, represents a valid ***extended*** [ISO 8601 DateTime](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) string. In other words, this scalar type accepts datetime strings of the form `YYYY-MM-DDThh:mm:ss.SSSZ`. The scalar can also accept \"negative years\" of the form `-YYYY` which correspond to years before `0000`. For example, \"**-2017-01-01T00:00Z**\" and \"**-9999-01-01T00:00Z**\" are both valid datetime strings. The field after the two digit seconds field is a nanoseconds field. It can accept between 1 and 9 digits. So, for example, \"**1970-01-01T12:00:00.2Z**\", \"**1970-01-01T12:00:00.277Z**\" and \"**1970-01-01T12:00:00.123456789Z**\" are all valid datetime strings. The seconds and nanoseconds fields are optional (the seconds field must be specified if the nanoseconds field is to be used). The [time zone offset](https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators) is compulsory for this scalar. The time zone offset must either be `Z` (representing the UTC time zone) or be in the format `±hh:mm:ss`. The seconds field in the timezone offset will be considered valid even though it is not part of the ISO 8601 standard.",
212 | "fields" : null,
213 | "inputFields" : null,
214 | "interfaces" : null,
215 | "enumValues" : null,
216 | "possibleTypes" : null
217 | }, {
218 | "kind" : "OBJECT",
219 | "name" : "ModelDeviceConnection",
220 | "description" : null,
221 | "fields" : [ {
222 | "name" : "items",
223 | "description" : null,
224 | "args" : [ ],
225 | "type" : {
226 | "kind" : "LIST",
227 | "name" : null,
228 | "ofType" : {
229 | "kind" : "OBJECT",
230 | "name" : "Device",
231 | "ofType" : null
232 | }
233 | },
234 | "isDeprecated" : false,
235 | "deprecationReason" : null
236 | }, {
237 | "name" : "nextToken",
238 | "description" : null,
239 | "args" : [ ],
240 | "type" : {
241 | "kind" : "SCALAR",
242 | "name" : "String",
243 | "ofType" : null
244 | },
245 | "isDeprecated" : false,
246 | "deprecationReason" : null
247 | } ],
248 | "inputFields" : null,
249 | "interfaces" : [ ],
250 | "enumValues" : null,
251 | "possibleTypes" : null
252 | }, {
253 | "kind" : "INPUT_OBJECT",
254 | "name" : "ModelDeviceFilterInput",
255 | "description" : null,
256 | "fields" : null,
257 | "inputFields" : [ {
258 | "name" : "id",
259 | "description" : null,
260 | "type" : {
261 | "kind" : "INPUT_OBJECT",
262 | "name" : "ModelIDInput",
263 | "ofType" : null
264 | },
265 | "defaultValue" : null
266 | }, {
267 | "name" : "name",
268 | "description" : null,
269 | "type" : {
270 | "kind" : "INPUT_OBJECT",
271 | "name" : "ModelStringInput",
272 | "ofType" : null
273 | },
274 | "defaultValue" : null
275 | }, {
276 | "name" : "trackerName",
277 | "description" : null,
278 | "type" : {
279 | "kind" : "INPUT_OBJECT",
280 | "name" : "ModelStringInput",
281 | "ofType" : null
282 | },
283 | "defaultValue" : null
284 | }, {
285 | "name" : "latitude",
286 | "description" : null,
287 | "type" : {
288 | "kind" : "INPUT_OBJECT",
289 | "name" : "ModelStringInput",
290 | "ofType" : null
291 | },
292 | "defaultValue" : null
293 | }, {
294 | "name" : "longitude",
295 | "description" : null,
296 | "type" : {
297 | "kind" : "INPUT_OBJECT",
298 | "name" : "ModelStringInput",
299 | "ofType" : null
300 | },
301 | "defaultValue" : null
302 | }, {
303 | "name" : "and",
304 | "description" : null,
305 | "type" : {
306 | "kind" : "LIST",
307 | "name" : null,
308 | "ofType" : {
309 | "kind" : "INPUT_OBJECT",
310 | "name" : "ModelDeviceFilterInput",
311 | "ofType" : null
312 | }
313 | },
314 | "defaultValue" : null
315 | }, {
316 | "name" : "or",
317 | "description" : null,
318 | "type" : {
319 | "kind" : "LIST",
320 | "name" : null,
321 | "ofType" : {
322 | "kind" : "INPUT_OBJECT",
323 | "name" : "ModelDeviceFilterInput",
324 | "ofType" : null
325 | }
326 | },
327 | "defaultValue" : null
328 | }, {
329 | "name" : "not",
330 | "description" : null,
331 | "type" : {
332 | "kind" : "INPUT_OBJECT",
333 | "name" : "ModelDeviceFilterInput",
334 | "ofType" : null
335 | },
336 | "defaultValue" : null
337 | } ],
338 | "interfaces" : null,
339 | "enumValues" : null,
340 | "possibleTypes" : null
341 | }, {
342 | "kind" : "INPUT_OBJECT",
343 | "name" : "ModelIDInput",
344 | "description" : null,
345 | "fields" : null,
346 | "inputFields" : [ {
347 | "name" : "ne",
348 | "description" : null,
349 | "type" : {
350 | "kind" : "SCALAR",
351 | "name" : "ID",
352 | "ofType" : null
353 | },
354 | "defaultValue" : null
355 | }, {
356 | "name" : "eq",
357 | "description" : null,
358 | "type" : {
359 | "kind" : "SCALAR",
360 | "name" : "ID",
361 | "ofType" : null
362 | },
363 | "defaultValue" : null
364 | }, {
365 | "name" : "le",
366 | "description" : null,
367 | "type" : {
368 | "kind" : "SCALAR",
369 | "name" : "ID",
370 | "ofType" : null
371 | },
372 | "defaultValue" : null
373 | }, {
374 | "name" : "lt",
375 | "description" : null,
376 | "type" : {
377 | "kind" : "SCALAR",
378 | "name" : "ID",
379 | "ofType" : null
380 | },
381 | "defaultValue" : null
382 | }, {
383 | "name" : "ge",
384 | "description" : null,
385 | "type" : {
386 | "kind" : "SCALAR",
387 | "name" : "ID",
388 | "ofType" : null
389 | },
390 | "defaultValue" : null
391 | }, {
392 | "name" : "gt",
393 | "description" : null,
394 | "type" : {
395 | "kind" : "SCALAR",
396 | "name" : "ID",
397 | "ofType" : null
398 | },
399 | "defaultValue" : null
400 | }, {
401 | "name" : "contains",
402 | "description" : null,
403 | "type" : {
404 | "kind" : "SCALAR",
405 | "name" : "ID",
406 | "ofType" : null
407 | },
408 | "defaultValue" : null
409 | }, {
410 | "name" : "notContains",
411 | "description" : null,
412 | "type" : {
413 | "kind" : "SCALAR",
414 | "name" : "ID",
415 | "ofType" : null
416 | },
417 | "defaultValue" : null
418 | }, {
419 | "name" : "between",
420 | "description" : null,
421 | "type" : {
422 | "kind" : "LIST",
423 | "name" : null,
424 | "ofType" : {
425 | "kind" : "SCALAR",
426 | "name" : "ID",
427 | "ofType" : null
428 | }
429 | },
430 | "defaultValue" : null
431 | }, {
432 | "name" : "beginsWith",
433 | "description" : null,
434 | "type" : {
435 | "kind" : "SCALAR",
436 | "name" : "ID",
437 | "ofType" : null
438 | },
439 | "defaultValue" : null
440 | }, {
441 | "name" : "attributeExists",
442 | "description" : null,
443 | "type" : {
444 | "kind" : "SCALAR",
445 | "name" : "Boolean",
446 | "ofType" : null
447 | },
448 | "defaultValue" : null
449 | }, {
450 | "name" : "attributeType",
451 | "description" : null,
452 | "type" : {
453 | "kind" : "ENUM",
454 | "name" : "ModelAttributeTypes",
455 | "ofType" : null
456 | },
457 | "defaultValue" : null
458 | }, {
459 | "name" : "size",
460 | "description" : null,
461 | "type" : {
462 | "kind" : "INPUT_OBJECT",
463 | "name" : "ModelSizeInput",
464 | "ofType" : null
465 | },
466 | "defaultValue" : null
467 | } ],
468 | "interfaces" : null,
469 | "enumValues" : null,
470 | "possibleTypes" : null
471 | }, {
472 | "kind" : "SCALAR",
473 | "name" : "Boolean",
474 | "description" : "Built-in Boolean",
475 | "fields" : null,
476 | "inputFields" : null,
477 | "interfaces" : null,
478 | "enumValues" : null,
479 | "possibleTypes" : null
480 | }, {
481 | "kind" : "ENUM",
482 | "name" : "ModelAttributeTypes",
483 | "description" : null,
484 | "fields" : null,
485 | "inputFields" : null,
486 | "interfaces" : null,
487 | "enumValues" : [ {
488 | "name" : "binary",
489 | "description" : null,
490 | "isDeprecated" : false,
491 | "deprecationReason" : null
492 | }, {
493 | "name" : "binarySet",
494 | "description" : null,
495 | "isDeprecated" : false,
496 | "deprecationReason" : null
497 | }, {
498 | "name" : "bool",
499 | "description" : null,
500 | "isDeprecated" : false,
501 | "deprecationReason" : null
502 | }, {
503 | "name" : "list",
504 | "description" : null,
505 | "isDeprecated" : false,
506 | "deprecationReason" : null
507 | }, {
508 | "name" : "map",
509 | "description" : null,
510 | "isDeprecated" : false,
511 | "deprecationReason" : null
512 | }, {
513 | "name" : "number",
514 | "description" : null,
515 | "isDeprecated" : false,
516 | "deprecationReason" : null
517 | }, {
518 | "name" : "numberSet",
519 | "description" : null,
520 | "isDeprecated" : false,
521 | "deprecationReason" : null
522 | }, {
523 | "name" : "string",
524 | "description" : null,
525 | "isDeprecated" : false,
526 | "deprecationReason" : null
527 | }, {
528 | "name" : "stringSet",
529 | "description" : null,
530 | "isDeprecated" : false,
531 | "deprecationReason" : null
532 | }, {
533 | "name" : "_null",
534 | "description" : null,
535 | "isDeprecated" : false,
536 | "deprecationReason" : null
537 | } ],
538 | "possibleTypes" : null
539 | }, {
540 | "kind" : "INPUT_OBJECT",
541 | "name" : "ModelSizeInput",
542 | "description" : null,
543 | "fields" : null,
544 | "inputFields" : [ {
545 | "name" : "ne",
546 | "description" : null,
547 | "type" : {
548 | "kind" : "SCALAR",
549 | "name" : "Int",
550 | "ofType" : null
551 | },
552 | "defaultValue" : null
553 | }, {
554 | "name" : "eq",
555 | "description" : null,
556 | "type" : {
557 | "kind" : "SCALAR",
558 | "name" : "Int",
559 | "ofType" : null
560 | },
561 | "defaultValue" : null
562 | }, {
563 | "name" : "le",
564 | "description" : null,
565 | "type" : {
566 | "kind" : "SCALAR",
567 | "name" : "Int",
568 | "ofType" : null
569 | },
570 | "defaultValue" : null
571 | }, {
572 | "name" : "lt",
573 | "description" : null,
574 | "type" : {
575 | "kind" : "SCALAR",
576 | "name" : "Int",
577 | "ofType" : null
578 | },
579 | "defaultValue" : null
580 | }, {
581 | "name" : "ge",
582 | "description" : null,
583 | "type" : {
584 | "kind" : "SCALAR",
585 | "name" : "Int",
586 | "ofType" : null
587 | },
588 | "defaultValue" : null
589 | }, {
590 | "name" : "gt",
591 | "description" : null,
592 | "type" : {
593 | "kind" : "SCALAR",
594 | "name" : "Int",
595 | "ofType" : null
596 | },
597 | "defaultValue" : null
598 | }, {
599 | "name" : "between",
600 | "description" : null,
601 | "type" : {
602 | "kind" : "LIST",
603 | "name" : null,
604 | "ofType" : {
605 | "kind" : "SCALAR",
606 | "name" : "Int",
607 | "ofType" : null
608 | }
609 | },
610 | "defaultValue" : null
611 | } ],
612 | "interfaces" : null,
613 | "enumValues" : null,
614 | "possibleTypes" : null
615 | }, {
616 | "kind" : "SCALAR",
617 | "name" : "Int",
618 | "description" : "Built-in Int",
619 | "fields" : null,
620 | "inputFields" : null,
621 | "interfaces" : null,
622 | "enumValues" : null,
623 | "possibleTypes" : null
624 | }, {
625 | "kind" : "INPUT_OBJECT",
626 | "name" : "ModelStringInput",
627 | "description" : null,
628 | "fields" : null,
629 | "inputFields" : [ {
630 | "name" : "ne",
631 | "description" : null,
632 | "type" : {
633 | "kind" : "SCALAR",
634 | "name" : "String",
635 | "ofType" : null
636 | },
637 | "defaultValue" : null
638 | }, {
639 | "name" : "eq",
640 | "description" : null,
641 | "type" : {
642 | "kind" : "SCALAR",
643 | "name" : "String",
644 | "ofType" : null
645 | },
646 | "defaultValue" : null
647 | }, {
648 | "name" : "le",
649 | "description" : null,
650 | "type" : {
651 | "kind" : "SCALAR",
652 | "name" : "String",
653 | "ofType" : null
654 | },
655 | "defaultValue" : null
656 | }, {
657 | "name" : "lt",
658 | "description" : null,
659 | "type" : {
660 | "kind" : "SCALAR",
661 | "name" : "String",
662 | "ofType" : null
663 | },
664 | "defaultValue" : null
665 | }, {
666 | "name" : "ge",
667 | "description" : null,
668 | "type" : {
669 | "kind" : "SCALAR",
670 | "name" : "String",
671 | "ofType" : null
672 | },
673 | "defaultValue" : null
674 | }, {
675 | "name" : "gt",
676 | "description" : null,
677 | "type" : {
678 | "kind" : "SCALAR",
679 | "name" : "String",
680 | "ofType" : null
681 | },
682 | "defaultValue" : null
683 | }, {
684 | "name" : "contains",
685 | "description" : null,
686 | "type" : {
687 | "kind" : "SCALAR",
688 | "name" : "String",
689 | "ofType" : null
690 | },
691 | "defaultValue" : null
692 | }, {
693 | "name" : "notContains",
694 | "description" : null,
695 | "type" : {
696 | "kind" : "SCALAR",
697 | "name" : "String",
698 | "ofType" : null
699 | },
700 | "defaultValue" : null
701 | }, {
702 | "name" : "between",
703 | "description" : null,
704 | "type" : {
705 | "kind" : "LIST",
706 | "name" : null,
707 | "ofType" : {
708 | "kind" : "SCALAR",
709 | "name" : "String",
710 | "ofType" : null
711 | }
712 | },
713 | "defaultValue" : null
714 | }, {
715 | "name" : "beginsWith",
716 | "description" : null,
717 | "type" : {
718 | "kind" : "SCALAR",
719 | "name" : "String",
720 | "ofType" : null
721 | },
722 | "defaultValue" : null
723 | }, {
724 | "name" : "attributeExists",
725 | "description" : null,
726 | "type" : {
727 | "kind" : "SCALAR",
728 | "name" : "Boolean",
729 | "ofType" : null
730 | },
731 | "defaultValue" : null
732 | }, {
733 | "name" : "attributeType",
734 | "description" : null,
735 | "type" : {
736 | "kind" : "ENUM",
737 | "name" : "ModelAttributeTypes",
738 | "ofType" : null
739 | },
740 | "defaultValue" : null
741 | }, {
742 | "name" : "size",
743 | "description" : null,
744 | "type" : {
745 | "kind" : "INPUT_OBJECT",
746 | "name" : "ModelSizeInput",
747 | "ofType" : null
748 | },
749 | "defaultValue" : null
750 | } ],
751 | "interfaces" : null,
752 | "enumValues" : null,
753 | "possibleTypes" : null
754 | }, {
755 | "kind" : "OBJECT",
756 | "name" : "Mutation",
757 | "description" : null,
758 | "fields" : [ {
759 | "name" : "updateLocation",
760 | "description" : null,
761 | "args" : [ {
762 | "name" : "trackerName",
763 | "description" : null,
764 | "type" : {
765 | "kind" : "SCALAR",
766 | "name" : "String",
767 | "ofType" : null
768 | },
769 | "defaultValue" : null
770 | }, {
771 | "name" : "deviceId",
772 | "description" : null,
773 | "type" : {
774 | "kind" : "SCALAR",
775 | "name" : "String",
776 | "ofType" : null
777 | },
778 | "defaultValue" : null
779 | }, {
780 | "name" : "Latitude",
781 | "description" : null,
782 | "type" : {
783 | "kind" : "SCALAR",
784 | "name" : "String",
785 | "ofType" : null
786 | },
787 | "defaultValue" : null
788 | }, {
789 | "name" : "Longitude",
790 | "description" : null,
791 | "type" : {
792 | "kind" : "SCALAR",
793 | "name" : "String",
794 | "ofType" : null
795 | },
796 | "defaultValue" : null
797 | } ],
798 | "type" : {
799 | "kind" : "SCALAR",
800 | "name" : "String",
801 | "ofType" : null
802 | },
803 | "isDeprecated" : false,
804 | "deprecationReason" : null
805 | }, {
806 | "name" : "createDevice",
807 | "description" : null,
808 | "args" : [ {
809 | "name" : "input",
810 | "description" : null,
811 | "type" : {
812 | "kind" : "NON_NULL",
813 | "name" : null,
814 | "ofType" : {
815 | "kind" : "INPUT_OBJECT",
816 | "name" : "CreateDeviceInput",
817 | "ofType" : null
818 | }
819 | },
820 | "defaultValue" : null
821 | }, {
822 | "name" : "condition",
823 | "description" : null,
824 | "type" : {
825 | "kind" : "INPUT_OBJECT",
826 | "name" : "ModelDeviceConditionInput",
827 | "ofType" : null
828 | },
829 | "defaultValue" : null
830 | } ],
831 | "type" : {
832 | "kind" : "OBJECT",
833 | "name" : "Device",
834 | "ofType" : null
835 | },
836 | "isDeprecated" : false,
837 | "deprecationReason" : null
838 | }, {
839 | "name" : "updateDevice",
840 | "description" : null,
841 | "args" : [ {
842 | "name" : "input",
843 | "description" : null,
844 | "type" : {
845 | "kind" : "NON_NULL",
846 | "name" : null,
847 | "ofType" : {
848 | "kind" : "INPUT_OBJECT",
849 | "name" : "UpdateDeviceInput",
850 | "ofType" : null
851 | }
852 | },
853 | "defaultValue" : null
854 | }, {
855 | "name" : "condition",
856 | "description" : null,
857 | "type" : {
858 | "kind" : "INPUT_OBJECT",
859 | "name" : "ModelDeviceConditionInput",
860 | "ofType" : null
861 | },
862 | "defaultValue" : null
863 | } ],
864 | "type" : {
865 | "kind" : "OBJECT",
866 | "name" : "Device",
867 | "ofType" : null
868 | },
869 | "isDeprecated" : false,
870 | "deprecationReason" : null
871 | }, {
872 | "name" : "deleteDevice",
873 | "description" : null,
874 | "args" : [ {
875 | "name" : "input",
876 | "description" : null,
877 | "type" : {
878 | "kind" : "NON_NULL",
879 | "name" : null,
880 | "ofType" : {
881 | "kind" : "INPUT_OBJECT",
882 | "name" : "DeleteDeviceInput",
883 | "ofType" : null
884 | }
885 | },
886 | "defaultValue" : null
887 | }, {
888 | "name" : "condition",
889 | "description" : null,
890 | "type" : {
891 | "kind" : "INPUT_OBJECT",
892 | "name" : "ModelDeviceConditionInput",
893 | "ofType" : null
894 | },
895 | "defaultValue" : null
896 | } ],
897 | "type" : {
898 | "kind" : "OBJECT",
899 | "name" : "Device",
900 | "ofType" : null
901 | },
902 | "isDeprecated" : false,
903 | "deprecationReason" : null
904 | } ],
905 | "inputFields" : null,
906 | "interfaces" : [ ],
907 | "enumValues" : null,
908 | "possibleTypes" : null
909 | }, {
910 | "kind" : "INPUT_OBJECT",
911 | "name" : "CreateDeviceInput",
912 | "description" : null,
913 | "fields" : null,
914 | "inputFields" : [ {
915 | "name" : "id",
916 | "description" : null,
917 | "type" : {
918 | "kind" : "SCALAR",
919 | "name" : "ID",
920 | "ofType" : null
921 | },
922 | "defaultValue" : null
923 | }, {
924 | "name" : "name",
925 | "description" : null,
926 | "type" : {
927 | "kind" : "NON_NULL",
928 | "name" : null,
929 | "ofType" : {
930 | "kind" : "SCALAR",
931 | "name" : "String",
932 | "ofType" : null
933 | }
934 | },
935 | "defaultValue" : null
936 | }, {
937 | "name" : "trackerName",
938 | "description" : null,
939 | "type" : {
940 | "kind" : "NON_NULL",
941 | "name" : null,
942 | "ofType" : {
943 | "kind" : "SCALAR",
944 | "name" : "String",
945 | "ofType" : null
946 | }
947 | },
948 | "defaultValue" : null
949 | }, {
950 | "name" : "latitude",
951 | "description" : null,
952 | "type" : {
953 | "kind" : "SCALAR",
954 | "name" : "String",
955 | "ofType" : null
956 | },
957 | "defaultValue" : null
958 | }, {
959 | "name" : "longitude",
960 | "description" : null,
961 | "type" : {
962 | "kind" : "SCALAR",
963 | "name" : "String",
964 | "ofType" : null
965 | },
966 | "defaultValue" : null
967 | } ],
968 | "interfaces" : null,
969 | "enumValues" : null,
970 | "possibleTypes" : null
971 | }, {
972 | "kind" : "INPUT_OBJECT",
973 | "name" : "ModelDeviceConditionInput",
974 | "description" : null,
975 | "fields" : null,
976 | "inputFields" : [ {
977 | "name" : "name",
978 | "description" : null,
979 | "type" : {
980 | "kind" : "INPUT_OBJECT",
981 | "name" : "ModelStringInput",
982 | "ofType" : null
983 | },
984 | "defaultValue" : null
985 | }, {
986 | "name" : "trackerName",
987 | "description" : null,
988 | "type" : {
989 | "kind" : "INPUT_OBJECT",
990 | "name" : "ModelStringInput",
991 | "ofType" : null
992 | },
993 | "defaultValue" : null
994 | }, {
995 | "name" : "latitude",
996 | "description" : null,
997 | "type" : {
998 | "kind" : "INPUT_OBJECT",
999 | "name" : "ModelStringInput",
1000 | "ofType" : null
1001 | },
1002 | "defaultValue" : null
1003 | }, {
1004 | "name" : "longitude",
1005 | "description" : null,
1006 | "type" : {
1007 | "kind" : "INPUT_OBJECT",
1008 | "name" : "ModelStringInput",
1009 | "ofType" : null
1010 | },
1011 | "defaultValue" : null
1012 | }, {
1013 | "name" : "and",
1014 | "description" : null,
1015 | "type" : {
1016 | "kind" : "LIST",
1017 | "name" : null,
1018 | "ofType" : {
1019 | "kind" : "INPUT_OBJECT",
1020 | "name" : "ModelDeviceConditionInput",
1021 | "ofType" : null
1022 | }
1023 | },
1024 | "defaultValue" : null
1025 | }, {
1026 | "name" : "or",
1027 | "description" : null,
1028 | "type" : {
1029 | "kind" : "LIST",
1030 | "name" : null,
1031 | "ofType" : {
1032 | "kind" : "INPUT_OBJECT",
1033 | "name" : "ModelDeviceConditionInput",
1034 | "ofType" : null
1035 | }
1036 | },
1037 | "defaultValue" : null
1038 | }, {
1039 | "name" : "not",
1040 | "description" : null,
1041 | "type" : {
1042 | "kind" : "INPUT_OBJECT",
1043 | "name" : "ModelDeviceConditionInput",
1044 | "ofType" : null
1045 | },
1046 | "defaultValue" : null
1047 | } ],
1048 | "interfaces" : null,
1049 | "enumValues" : null,
1050 | "possibleTypes" : null
1051 | }, {
1052 | "kind" : "INPUT_OBJECT",
1053 | "name" : "UpdateDeviceInput",
1054 | "description" : null,
1055 | "fields" : null,
1056 | "inputFields" : [ {
1057 | "name" : "id",
1058 | "description" : null,
1059 | "type" : {
1060 | "kind" : "NON_NULL",
1061 | "name" : null,
1062 | "ofType" : {
1063 | "kind" : "SCALAR",
1064 | "name" : "ID",
1065 | "ofType" : null
1066 | }
1067 | },
1068 | "defaultValue" : null
1069 | }, {
1070 | "name" : "name",
1071 | "description" : null,
1072 | "type" : {
1073 | "kind" : "SCALAR",
1074 | "name" : "String",
1075 | "ofType" : null
1076 | },
1077 | "defaultValue" : null
1078 | }, {
1079 | "name" : "trackerName",
1080 | "description" : null,
1081 | "type" : {
1082 | "kind" : "SCALAR",
1083 | "name" : "String",
1084 | "ofType" : null
1085 | },
1086 | "defaultValue" : null
1087 | }, {
1088 | "name" : "latitude",
1089 | "description" : null,
1090 | "type" : {
1091 | "kind" : "SCALAR",
1092 | "name" : "String",
1093 | "ofType" : null
1094 | },
1095 | "defaultValue" : null
1096 | }, {
1097 | "name" : "longitude",
1098 | "description" : null,
1099 | "type" : {
1100 | "kind" : "SCALAR",
1101 | "name" : "String",
1102 | "ofType" : null
1103 | },
1104 | "defaultValue" : null
1105 | } ],
1106 | "interfaces" : null,
1107 | "enumValues" : null,
1108 | "possibleTypes" : null
1109 | }, {
1110 | "kind" : "INPUT_OBJECT",
1111 | "name" : "DeleteDeviceInput",
1112 | "description" : null,
1113 | "fields" : null,
1114 | "inputFields" : [ {
1115 | "name" : "id",
1116 | "description" : null,
1117 | "type" : {
1118 | "kind" : "NON_NULL",
1119 | "name" : null,
1120 | "ofType" : {
1121 | "kind" : "SCALAR",
1122 | "name" : "ID",
1123 | "ofType" : null
1124 | }
1125 | },
1126 | "defaultValue" : null
1127 | } ],
1128 | "interfaces" : null,
1129 | "enumValues" : null,
1130 | "possibleTypes" : null
1131 | }, {
1132 | "kind" : "OBJECT",
1133 | "name" : "Subscription",
1134 | "description" : null,
1135 | "fields" : [ {
1136 | "name" : "onCreateDevice",
1137 | "description" : null,
1138 | "args" : [ ],
1139 | "type" : {
1140 | "kind" : "OBJECT",
1141 | "name" : "Device",
1142 | "ofType" : null
1143 | },
1144 | "isDeprecated" : false,
1145 | "deprecationReason" : null
1146 | }, {
1147 | "name" : "onUpdateDevice",
1148 | "description" : null,
1149 | "args" : [ ],
1150 | "type" : {
1151 | "kind" : "OBJECT",
1152 | "name" : "Device",
1153 | "ofType" : null
1154 | },
1155 | "isDeprecated" : false,
1156 | "deprecationReason" : null
1157 | }, {
1158 | "name" : "onDeleteDevice",
1159 | "description" : null,
1160 | "args" : [ ],
1161 | "type" : {
1162 | "kind" : "OBJECT",
1163 | "name" : "Device",
1164 | "ofType" : null
1165 | },
1166 | "isDeprecated" : false,
1167 | "deprecationReason" : null
1168 | } ],
1169 | "inputFields" : null,
1170 | "interfaces" : [ ],
1171 | "enumValues" : null,
1172 | "possibleTypes" : null
1173 | }, {
1174 | "kind" : "INPUT_OBJECT",
1175 | "name" : "ModelIntInput",
1176 | "description" : null,
1177 | "fields" : null,
1178 | "inputFields" : [ {
1179 | "name" : "ne",
1180 | "description" : null,
1181 | "type" : {
1182 | "kind" : "SCALAR",
1183 | "name" : "Int",
1184 | "ofType" : null
1185 | },
1186 | "defaultValue" : null
1187 | }, {
1188 | "name" : "eq",
1189 | "description" : null,
1190 | "type" : {
1191 | "kind" : "SCALAR",
1192 | "name" : "Int",
1193 | "ofType" : null
1194 | },
1195 | "defaultValue" : null
1196 | }, {
1197 | "name" : "le",
1198 | "description" : null,
1199 | "type" : {
1200 | "kind" : "SCALAR",
1201 | "name" : "Int",
1202 | "ofType" : null
1203 | },
1204 | "defaultValue" : null
1205 | }, {
1206 | "name" : "lt",
1207 | "description" : null,
1208 | "type" : {
1209 | "kind" : "SCALAR",
1210 | "name" : "Int",
1211 | "ofType" : null
1212 | },
1213 | "defaultValue" : null
1214 | }, {
1215 | "name" : "ge",
1216 | "description" : null,
1217 | "type" : {
1218 | "kind" : "SCALAR",
1219 | "name" : "Int",
1220 | "ofType" : null
1221 | },
1222 | "defaultValue" : null
1223 | }, {
1224 | "name" : "gt",
1225 | "description" : null,
1226 | "type" : {
1227 | "kind" : "SCALAR",
1228 | "name" : "Int",
1229 | "ofType" : null
1230 | },
1231 | "defaultValue" : null
1232 | }, {
1233 | "name" : "between",
1234 | "description" : null,
1235 | "type" : {
1236 | "kind" : "LIST",
1237 | "name" : null,
1238 | "ofType" : {
1239 | "kind" : "SCALAR",
1240 | "name" : "Int",
1241 | "ofType" : null
1242 | }
1243 | },
1244 | "defaultValue" : null
1245 | }, {
1246 | "name" : "attributeExists",
1247 | "description" : null,
1248 | "type" : {
1249 | "kind" : "SCALAR",
1250 | "name" : "Boolean",
1251 | "ofType" : null
1252 | },
1253 | "defaultValue" : null
1254 | }, {
1255 | "name" : "attributeType",
1256 | "description" : null,
1257 | "type" : {
1258 | "kind" : "ENUM",
1259 | "name" : "ModelAttributeTypes",
1260 | "ofType" : null
1261 | },
1262 | "defaultValue" : null
1263 | } ],
1264 | "interfaces" : null,
1265 | "enumValues" : null,
1266 | "possibleTypes" : null
1267 | }, {
1268 | "kind" : "INPUT_OBJECT",
1269 | "name" : "ModelFloatInput",
1270 | "description" : null,
1271 | "fields" : null,
1272 | "inputFields" : [ {
1273 | "name" : "ne",
1274 | "description" : null,
1275 | "type" : {
1276 | "kind" : "SCALAR",
1277 | "name" : "Float",
1278 | "ofType" : null
1279 | },
1280 | "defaultValue" : null
1281 | }, {
1282 | "name" : "eq",
1283 | "description" : null,
1284 | "type" : {
1285 | "kind" : "SCALAR",
1286 | "name" : "Float",
1287 | "ofType" : null
1288 | },
1289 | "defaultValue" : null
1290 | }, {
1291 | "name" : "le",
1292 | "description" : null,
1293 | "type" : {
1294 | "kind" : "SCALAR",
1295 | "name" : "Float",
1296 | "ofType" : null
1297 | },
1298 | "defaultValue" : null
1299 | }, {
1300 | "name" : "lt",
1301 | "description" : null,
1302 | "type" : {
1303 | "kind" : "SCALAR",
1304 | "name" : "Float",
1305 | "ofType" : null
1306 | },
1307 | "defaultValue" : null
1308 | }, {
1309 | "name" : "ge",
1310 | "description" : null,
1311 | "type" : {
1312 | "kind" : "SCALAR",
1313 | "name" : "Float",
1314 | "ofType" : null
1315 | },
1316 | "defaultValue" : null
1317 | }, {
1318 | "name" : "gt",
1319 | "description" : null,
1320 | "type" : {
1321 | "kind" : "SCALAR",
1322 | "name" : "Float",
1323 | "ofType" : null
1324 | },
1325 | "defaultValue" : null
1326 | }, {
1327 | "name" : "between",
1328 | "description" : null,
1329 | "type" : {
1330 | "kind" : "LIST",
1331 | "name" : null,
1332 | "ofType" : {
1333 | "kind" : "SCALAR",
1334 | "name" : "Float",
1335 | "ofType" : null
1336 | }
1337 | },
1338 | "defaultValue" : null
1339 | }, {
1340 | "name" : "attributeExists",
1341 | "description" : null,
1342 | "type" : {
1343 | "kind" : "SCALAR",
1344 | "name" : "Boolean",
1345 | "ofType" : null
1346 | },
1347 | "defaultValue" : null
1348 | }, {
1349 | "name" : "attributeType",
1350 | "description" : null,
1351 | "type" : {
1352 | "kind" : "ENUM",
1353 | "name" : "ModelAttributeTypes",
1354 | "ofType" : null
1355 | },
1356 | "defaultValue" : null
1357 | } ],
1358 | "interfaces" : null,
1359 | "enumValues" : null,
1360 | "possibleTypes" : null
1361 | }, {
1362 | "kind" : "SCALAR",
1363 | "name" : "Float",
1364 | "description" : "Built-in Float",
1365 | "fields" : null,
1366 | "inputFields" : null,
1367 | "interfaces" : null,
1368 | "enumValues" : null,
1369 | "possibleTypes" : null
1370 | }, {
1371 | "kind" : "INPUT_OBJECT",
1372 | "name" : "ModelBooleanInput",
1373 | "description" : null,
1374 | "fields" : null,
1375 | "inputFields" : [ {
1376 | "name" : "ne",
1377 | "description" : null,
1378 | "type" : {
1379 | "kind" : "SCALAR",
1380 | "name" : "Boolean",
1381 | "ofType" : null
1382 | },
1383 | "defaultValue" : null
1384 | }, {
1385 | "name" : "eq",
1386 | "description" : null,
1387 | "type" : {
1388 | "kind" : "SCALAR",
1389 | "name" : "Boolean",
1390 | "ofType" : null
1391 | },
1392 | "defaultValue" : null
1393 | }, {
1394 | "name" : "attributeExists",
1395 | "description" : null,
1396 | "type" : {
1397 | "kind" : "SCALAR",
1398 | "name" : "Boolean",
1399 | "ofType" : null
1400 | },
1401 | "defaultValue" : null
1402 | }, {
1403 | "name" : "attributeType",
1404 | "description" : null,
1405 | "type" : {
1406 | "kind" : "ENUM",
1407 | "name" : "ModelAttributeTypes",
1408 | "ofType" : null
1409 | },
1410 | "defaultValue" : null
1411 | } ],
1412 | "interfaces" : null,
1413 | "enumValues" : null,
1414 | "possibleTypes" : null
1415 | }, {
1416 | "kind" : "ENUM",
1417 | "name" : "ModelSortDirection",
1418 | "description" : null,
1419 | "fields" : null,
1420 | "inputFields" : null,
1421 | "interfaces" : null,
1422 | "enumValues" : [ {
1423 | "name" : "ASC",
1424 | "description" : null,
1425 | "isDeprecated" : false,
1426 | "deprecationReason" : null
1427 | }, {
1428 | "name" : "DESC",
1429 | "description" : null,
1430 | "isDeprecated" : false,
1431 | "deprecationReason" : null
1432 | } ],
1433 | "possibleTypes" : null
1434 | }, {
1435 | "kind" : "OBJECT",
1436 | "name" : "__Schema",
1437 | "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.",
1438 | "fields" : [ {
1439 | "name" : "types",
1440 | "description" : "A list of all types supported by this server.",
1441 | "args" : [ ],
1442 | "type" : {
1443 | "kind" : "NON_NULL",
1444 | "name" : null,
1445 | "ofType" : {
1446 | "kind" : "LIST",
1447 | "name" : null,
1448 | "ofType" : {
1449 | "kind" : "NON_NULL",
1450 | "name" : null,
1451 | "ofType" : {
1452 | "kind" : "OBJECT",
1453 | "name" : "__Type",
1454 | "ofType" : null
1455 | }
1456 | }
1457 | }
1458 | },
1459 | "isDeprecated" : false,
1460 | "deprecationReason" : null
1461 | }, {
1462 | "name" : "queryType",
1463 | "description" : "The type that query operations will be rooted at.",
1464 | "args" : [ ],
1465 | "type" : {
1466 | "kind" : "NON_NULL",
1467 | "name" : null,
1468 | "ofType" : {
1469 | "kind" : "OBJECT",
1470 | "name" : "__Type",
1471 | "ofType" : null
1472 | }
1473 | },
1474 | "isDeprecated" : false,
1475 | "deprecationReason" : null
1476 | }, {
1477 | "name" : "mutationType",
1478 | "description" : "If this server supports mutation, the type that mutation operations will be rooted at.",
1479 | "args" : [ ],
1480 | "type" : {
1481 | "kind" : "OBJECT",
1482 | "name" : "__Type",
1483 | "ofType" : null
1484 | },
1485 | "isDeprecated" : false,
1486 | "deprecationReason" : null
1487 | }, {
1488 | "name" : "directives",
1489 | "description" : "'A list of all directives supported by this server.",
1490 | "args" : [ ],
1491 | "type" : {
1492 | "kind" : "NON_NULL",
1493 | "name" : null,
1494 | "ofType" : {
1495 | "kind" : "LIST",
1496 | "name" : null,
1497 | "ofType" : {
1498 | "kind" : "NON_NULL",
1499 | "name" : null,
1500 | "ofType" : {
1501 | "kind" : "OBJECT",
1502 | "name" : "__Directive",
1503 | "ofType" : null
1504 | }
1505 | }
1506 | }
1507 | },
1508 | "isDeprecated" : false,
1509 | "deprecationReason" : null
1510 | }, {
1511 | "name" : "subscriptionType",
1512 | "description" : "'If this server support subscription, the type that subscription operations will be rooted at.",
1513 | "args" : [ ],
1514 | "type" : {
1515 | "kind" : "OBJECT",
1516 | "name" : "__Type",
1517 | "ofType" : null
1518 | },
1519 | "isDeprecated" : false,
1520 | "deprecationReason" : null
1521 | } ],
1522 | "inputFields" : null,
1523 | "interfaces" : [ ],
1524 | "enumValues" : null,
1525 | "possibleTypes" : null
1526 | }, {
1527 | "kind" : "OBJECT",
1528 | "name" : "__Type",
1529 | "description" : null,
1530 | "fields" : [ {
1531 | "name" : "kind",
1532 | "description" : null,
1533 | "args" : [ ],
1534 | "type" : {
1535 | "kind" : "NON_NULL",
1536 | "name" : null,
1537 | "ofType" : {
1538 | "kind" : "ENUM",
1539 | "name" : "__TypeKind",
1540 | "ofType" : null
1541 | }
1542 | },
1543 | "isDeprecated" : false,
1544 | "deprecationReason" : null
1545 | }, {
1546 | "name" : "name",
1547 | "description" : null,
1548 | "args" : [ ],
1549 | "type" : {
1550 | "kind" : "SCALAR",
1551 | "name" : "String",
1552 | "ofType" : null
1553 | },
1554 | "isDeprecated" : false,
1555 | "deprecationReason" : null
1556 | }, {
1557 | "name" : "description",
1558 | "description" : null,
1559 | "args" : [ ],
1560 | "type" : {
1561 | "kind" : "SCALAR",
1562 | "name" : "String",
1563 | "ofType" : null
1564 | },
1565 | "isDeprecated" : false,
1566 | "deprecationReason" : null
1567 | }, {
1568 | "name" : "fields",
1569 | "description" : null,
1570 | "args" : [ {
1571 | "name" : "includeDeprecated",
1572 | "description" : null,
1573 | "type" : {
1574 | "kind" : "SCALAR",
1575 | "name" : "Boolean",
1576 | "ofType" : null
1577 | },
1578 | "defaultValue" : "false"
1579 | } ],
1580 | "type" : {
1581 | "kind" : "LIST",
1582 | "name" : null,
1583 | "ofType" : {
1584 | "kind" : "NON_NULL",
1585 | "name" : null,
1586 | "ofType" : {
1587 | "kind" : "OBJECT",
1588 | "name" : "__Field",
1589 | "ofType" : null
1590 | }
1591 | }
1592 | },
1593 | "isDeprecated" : false,
1594 | "deprecationReason" : null
1595 | }, {
1596 | "name" : "interfaces",
1597 | "description" : null,
1598 | "args" : [ ],
1599 | "type" : {
1600 | "kind" : "LIST",
1601 | "name" : null,
1602 | "ofType" : {
1603 | "kind" : "NON_NULL",
1604 | "name" : null,
1605 | "ofType" : {
1606 | "kind" : "OBJECT",
1607 | "name" : "__Type",
1608 | "ofType" : null
1609 | }
1610 | }
1611 | },
1612 | "isDeprecated" : false,
1613 | "deprecationReason" : null
1614 | }, {
1615 | "name" : "possibleTypes",
1616 | "description" : null,
1617 | "args" : [ ],
1618 | "type" : {
1619 | "kind" : "LIST",
1620 | "name" : null,
1621 | "ofType" : {
1622 | "kind" : "NON_NULL",
1623 | "name" : null,
1624 | "ofType" : {
1625 | "kind" : "OBJECT",
1626 | "name" : "__Type",
1627 | "ofType" : null
1628 | }
1629 | }
1630 | },
1631 | "isDeprecated" : false,
1632 | "deprecationReason" : null
1633 | }, {
1634 | "name" : "enumValues",
1635 | "description" : null,
1636 | "args" : [ {
1637 | "name" : "includeDeprecated",
1638 | "description" : null,
1639 | "type" : {
1640 | "kind" : "SCALAR",
1641 | "name" : "Boolean",
1642 | "ofType" : null
1643 | },
1644 | "defaultValue" : "false"
1645 | } ],
1646 | "type" : {
1647 | "kind" : "LIST",
1648 | "name" : null,
1649 | "ofType" : {
1650 | "kind" : "NON_NULL",
1651 | "name" : null,
1652 | "ofType" : {
1653 | "kind" : "OBJECT",
1654 | "name" : "__EnumValue",
1655 | "ofType" : null
1656 | }
1657 | }
1658 | },
1659 | "isDeprecated" : false,
1660 | "deprecationReason" : null
1661 | }, {
1662 | "name" : "inputFields",
1663 | "description" : null,
1664 | "args" : [ ],
1665 | "type" : {
1666 | "kind" : "LIST",
1667 | "name" : null,
1668 | "ofType" : {
1669 | "kind" : "NON_NULL",
1670 | "name" : null,
1671 | "ofType" : {
1672 | "kind" : "OBJECT",
1673 | "name" : "__InputValue",
1674 | "ofType" : null
1675 | }
1676 | }
1677 | },
1678 | "isDeprecated" : false,
1679 | "deprecationReason" : null
1680 | }, {
1681 | "name" : "ofType",
1682 | "description" : null,
1683 | "args" : [ ],
1684 | "type" : {
1685 | "kind" : "OBJECT",
1686 | "name" : "__Type",
1687 | "ofType" : null
1688 | },
1689 | "isDeprecated" : false,
1690 | "deprecationReason" : null
1691 | } ],
1692 | "inputFields" : null,
1693 | "interfaces" : [ ],
1694 | "enumValues" : null,
1695 | "possibleTypes" : null
1696 | }, {
1697 | "kind" : "ENUM",
1698 | "name" : "__TypeKind",
1699 | "description" : "An enum describing what kind of type a given __Type is",
1700 | "fields" : null,
1701 | "inputFields" : null,
1702 | "interfaces" : null,
1703 | "enumValues" : [ {
1704 | "name" : "SCALAR",
1705 | "description" : "Indicates this type is a scalar.",
1706 | "isDeprecated" : false,
1707 | "deprecationReason" : null
1708 | }, {
1709 | "name" : "OBJECT",
1710 | "description" : "Indicates this type is an object. `fields` and `interfaces` are valid fields.",
1711 | "isDeprecated" : false,
1712 | "deprecationReason" : null
1713 | }, {
1714 | "name" : "INTERFACE",
1715 | "description" : "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.",
1716 | "isDeprecated" : false,
1717 | "deprecationReason" : null
1718 | }, {
1719 | "name" : "UNION",
1720 | "description" : "Indicates this type is a union. `possibleTypes` is a valid field.",
1721 | "isDeprecated" : false,
1722 | "deprecationReason" : null
1723 | }, {
1724 | "name" : "ENUM",
1725 | "description" : "Indicates this type is an enum. `enumValues` is a valid field.",
1726 | "isDeprecated" : false,
1727 | "deprecationReason" : null
1728 | }, {
1729 | "name" : "INPUT_OBJECT",
1730 | "description" : "Indicates this type is an input object. `inputFields` is a valid field.",
1731 | "isDeprecated" : false,
1732 | "deprecationReason" : null
1733 | }, {
1734 | "name" : "LIST",
1735 | "description" : "Indicates this type is a list. `ofType` is a valid field.",
1736 | "isDeprecated" : false,
1737 | "deprecationReason" : null
1738 | }, {
1739 | "name" : "NON_NULL",
1740 | "description" : "Indicates this type is a non-null. `ofType` is a valid field.",
1741 | "isDeprecated" : false,
1742 | "deprecationReason" : null
1743 | } ],
1744 | "possibleTypes" : null
1745 | }, {
1746 | "kind" : "OBJECT",
1747 | "name" : "__Field",
1748 | "description" : null,
1749 | "fields" : [ {
1750 | "name" : "name",
1751 | "description" : null,
1752 | "args" : [ ],
1753 | "type" : {
1754 | "kind" : "NON_NULL",
1755 | "name" : null,
1756 | "ofType" : {
1757 | "kind" : "SCALAR",
1758 | "name" : "String",
1759 | "ofType" : null
1760 | }
1761 | },
1762 | "isDeprecated" : false,
1763 | "deprecationReason" : null
1764 | }, {
1765 | "name" : "description",
1766 | "description" : null,
1767 | "args" : [ ],
1768 | "type" : {
1769 | "kind" : "SCALAR",
1770 | "name" : "String",
1771 | "ofType" : null
1772 | },
1773 | "isDeprecated" : false,
1774 | "deprecationReason" : null
1775 | }, {
1776 | "name" : "args",
1777 | "description" : null,
1778 | "args" : [ ],
1779 | "type" : {
1780 | "kind" : "NON_NULL",
1781 | "name" : null,
1782 | "ofType" : {
1783 | "kind" : "LIST",
1784 | "name" : null,
1785 | "ofType" : {
1786 | "kind" : "NON_NULL",
1787 | "name" : null,
1788 | "ofType" : {
1789 | "kind" : "OBJECT",
1790 | "name" : "__InputValue",
1791 | "ofType" : null
1792 | }
1793 | }
1794 | }
1795 | },
1796 | "isDeprecated" : false,
1797 | "deprecationReason" : null
1798 | }, {
1799 | "name" : "type",
1800 | "description" : null,
1801 | "args" : [ ],
1802 | "type" : {
1803 | "kind" : "NON_NULL",
1804 | "name" : null,
1805 | "ofType" : {
1806 | "kind" : "OBJECT",
1807 | "name" : "__Type",
1808 | "ofType" : null
1809 | }
1810 | },
1811 | "isDeprecated" : false,
1812 | "deprecationReason" : null
1813 | }, {
1814 | "name" : "isDeprecated",
1815 | "description" : null,
1816 | "args" : [ ],
1817 | "type" : {
1818 | "kind" : "NON_NULL",
1819 | "name" : null,
1820 | "ofType" : {
1821 | "kind" : "SCALAR",
1822 | "name" : "Boolean",
1823 | "ofType" : null
1824 | }
1825 | },
1826 | "isDeprecated" : false,
1827 | "deprecationReason" : null
1828 | }, {
1829 | "name" : "deprecationReason",
1830 | "description" : null,
1831 | "args" : [ ],
1832 | "type" : {
1833 | "kind" : "SCALAR",
1834 | "name" : "String",
1835 | "ofType" : null
1836 | },
1837 | "isDeprecated" : false,
1838 | "deprecationReason" : null
1839 | } ],
1840 | "inputFields" : null,
1841 | "interfaces" : [ ],
1842 | "enumValues" : null,
1843 | "possibleTypes" : null
1844 | }, {
1845 | "kind" : "OBJECT",
1846 | "name" : "__InputValue",
1847 | "description" : null,
1848 | "fields" : [ {
1849 | "name" : "name",
1850 | "description" : null,
1851 | "args" : [ ],
1852 | "type" : {
1853 | "kind" : "NON_NULL",
1854 | "name" : null,
1855 | "ofType" : {
1856 | "kind" : "SCALAR",
1857 | "name" : "String",
1858 | "ofType" : null
1859 | }
1860 | },
1861 | "isDeprecated" : false,
1862 | "deprecationReason" : null
1863 | }, {
1864 | "name" : "description",
1865 | "description" : null,
1866 | "args" : [ ],
1867 | "type" : {
1868 | "kind" : "SCALAR",
1869 | "name" : "String",
1870 | "ofType" : null
1871 | },
1872 | "isDeprecated" : false,
1873 | "deprecationReason" : null
1874 | }, {
1875 | "name" : "type",
1876 | "description" : null,
1877 | "args" : [ ],
1878 | "type" : {
1879 | "kind" : "NON_NULL",
1880 | "name" : null,
1881 | "ofType" : {
1882 | "kind" : "OBJECT",
1883 | "name" : "__Type",
1884 | "ofType" : null
1885 | }
1886 | },
1887 | "isDeprecated" : false,
1888 | "deprecationReason" : null
1889 | }, {
1890 | "name" : "defaultValue",
1891 | "description" : null,
1892 | "args" : [ ],
1893 | "type" : {
1894 | "kind" : "SCALAR",
1895 | "name" : "String",
1896 | "ofType" : null
1897 | },
1898 | "isDeprecated" : false,
1899 | "deprecationReason" : null
1900 | } ],
1901 | "inputFields" : null,
1902 | "interfaces" : [ ],
1903 | "enumValues" : null,
1904 | "possibleTypes" : null
1905 | }, {
1906 | "kind" : "OBJECT",
1907 | "name" : "__EnumValue",
1908 | "description" : null,
1909 | "fields" : [ {
1910 | "name" : "name",
1911 | "description" : null,
1912 | "args" : [ ],
1913 | "type" : {
1914 | "kind" : "NON_NULL",
1915 | "name" : null,
1916 | "ofType" : {
1917 | "kind" : "SCALAR",
1918 | "name" : "String",
1919 | "ofType" : null
1920 | }
1921 | },
1922 | "isDeprecated" : false,
1923 | "deprecationReason" : null
1924 | }, {
1925 | "name" : "description",
1926 | "description" : null,
1927 | "args" : [ ],
1928 | "type" : {
1929 | "kind" : "SCALAR",
1930 | "name" : "String",
1931 | "ofType" : null
1932 | },
1933 | "isDeprecated" : false,
1934 | "deprecationReason" : null
1935 | }, {
1936 | "name" : "isDeprecated",
1937 | "description" : null,
1938 | "args" : [ ],
1939 | "type" : {
1940 | "kind" : "NON_NULL",
1941 | "name" : null,
1942 | "ofType" : {
1943 | "kind" : "SCALAR",
1944 | "name" : "Boolean",
1945 | "ofType" : null
1946 | }
1947 | },
1948 | "isDeprecated" : false,
1949 | "deprecationReason" : null
1950 | }, {
1951 | "name" : "deprecationReason",
1952 | "description" : null,
1953 | "args" : [ ],
1954 | "type" : {
1955 | "kind" : "SCALAR",
1956 | "name" : "String",
1957 | "ofType" : null
1958 | },
1959 | "isDeprecated" : false,
1960 | "deprecationReason" : null
1961 | } ],
1962 | "inputFields" : null,
1963 | "interfaces" : [ ],
1964 | "enumValues" : null,
1965 | "possibleTypes" : null
1966 | }, {
1967 | "kind" : "OBJECT",
1968 | "name" : "__Directive",
1969 | "description" : null,
1970 | "fields" : [ {
1971 | "name" : "name",
1972 | "description" : null,
1973 | "args" : [ ],
1974 | "type" : {
1975 | "kind" : "SCALAR",
1976 | "name" : "String",
1977 | "ofType" : null
1978 | },
1979 | "isDeprecated" : false,
1980 | "deprecationReason" : null
1981 | }, {
1982 | "name" : "description",
1983 | "description" : null,
1984 | "args" : [ ],
1985 | "type" : {
1986 | "kind" : "SCALAR",
1987 | "name" : "String",
1988 | "ofType" : null
1989 | },
1990 | "isDeprecated" : false,
1991 | "deprecationReason" : null
1992 | }, {
1993 | "name" : "locations",
1994 | "description" : null,
1995 | "args" : [ ],
1996 | "type" : {
1997 | "kind" : "LIST",
1998 | "name" : null,
1999 | "ofType" : {
2000 | "kind" : "NON_NULL",
2001 | "name" : null,
2002 | "ofType" : {
2003 | "kind" : "ENUM",
2004 | "name" : "__DirectiveLocation",
2005 | "ofType" : null
2006 | }
2007 | }
2008 | },
2009 | "isDeprecated" : false,
2010 | "deprecationReason" : null
2011 | }, {
2012 | "name" : "args",
2013 | "description" : null,
2014 | "args" : [ ],
2015 | "type" : {
2016 | "kind" : "NON_NULL",
2017 | "name" : null,
2018 | "ofType" : {
2019 | "kind" : "LIST",
2020 | "name" : null,
2021 | "ofType" : {
2022 | "kind" : "NON_NULL",
2023 | "name" : null,
2024 | "ofType" : {
2025 | "kind" : "OBJECT",
2026 | "name" : "__InputValue",
2027 | "ofType" : null
2028 | }
2029 | }
2030 | }
2031 | },
2032 | "isDeprecated" : false,
2033 | "deprecationReason" : null
2034 | }, {
2035 | "name" : "onOperation",
2036 | "description" : null,
2037 | "args" : [ ],
2038 | "type" : {
2039 | "kind" : "SCALAR",
2040 | "name" : "Boolean",
2041 | "ofType" : null
2042 | },
2043 | "isDeprecated" : true,
2044 | "deprecationReason" : "Use `locations`."
2045 | }, {
2046 | "name" : "onFragment",
2047 | "description" : null,
2048 | "args" : [ ],
2049 | "type" : {
2050 | "kind" : "SCALAR",
2051 | "name" : "Boolean",
2052 | "ofType" : null
2053 | },
2054 | "isDeprecated" : true,
2055 | "deprecationReason" : "Use `locations`."
2056 | }, {
2057 | "name" : "onField",
2058 | "description" : null,
2059 | "args" : [ ],
2060 | "type" : {
2061 | "kind" : "SCALAR",
2062 | "name" : "Boolean",
2063 | "ofType" : null
2064 | },
2065 | "isDeprecated" : true,
2066 | "deprecationReason" : "Use `locations`."
2067 | } ],
2068 | "inputFields" : null,
2069 | "interfaces" : [ ],
2070 | "enumValues" : null,
2071 | "possibleTypes" : null
2072 | }, {
2073 | "kind" : "ENUM",
2074 | "name" : "__DirectiveLocation",
2075 | "description" : "An enum describing valid locations where a directive can be placed",
2076 | "fields" : null,
2077 | "inputFields" : null,
2078 | "interfaces" : null,
2079 | "enumValues" : [ {
2080 | "name" : "QUERY",
2081 | "description" : "Indicates the directive is valid on queries.",
2082 | "isDeprecated" : false,
2083 | "deprecationReason" : null
2084 | }, {
2085 | "name" : "MUTATION",
2086 | "description" : "Indicates the directive is valid on mutations.",
2087 | "isDeprecated" : false,
2088 | "deprecationReason" : null
2089 | }, {
2090 | "name" : "FIELD",
2091 | "description" : "Indicates the directive is valid on fields.",
2092 | "isDeprecated" : false,
2093 | "deprecationReason" : null
2094 | }, {
2095 | "name" : "FRAGMENT_DEFINITION",
2096 | "description" : "Indicates the directive is valid on fragment definitions.",
2097 | "isDeprecated" : false,
2098 | "deprecationReason" : null
2099 | }, {
2100 | "name" : "FRAGMENT_SPREAD",
2101 | "description" : "Indicates the directive is valid on fragment spreads.",
2102 | "isDeprecated" : false,
2103 | "deprecationReason" : null
2104 | }, {
2105 | "name" : "INLINE_FRAGMENT",
2106 | "description" : "Indicates the directive is valid on inline fragments.",
2107 | "isDeprecated" : false,
2108 | "deprecationReason" : null
2109 | }, {
2110 | "name" : "SCHEMA",
2111 | "description" : "Indicates the directive is valid on a schema SDL definition.",
2112 | "isDeprecated" : false,
2113 | "deprecationReason" : null
2114 | }, {
2115 | "name" : "SCALAR",
2116 | "description" : "Indicates the directive is valid on a scalar SDL definition.",
2117 | "isDeprecated" : false,
2118 | "deprecationReason" : null
2119 | }, {
2120 | "name" : "OBJECT",
2121 | "description" : "Indicates the directive is valid on an object SDL definition.",
2122 | "isDeprecated" : false,
2123 | "deprecationReason" : null
2124 | }, {
2125 | "name" : "FIELD_DEFINITION",
2126 | "description" : "Indicates the directive is valid on a field SDL definition.",
2127 | "isDeprecated" : false,
2128 | "deprecationReason" : null
2129 | }, {
2130 | "name" : "ARGUMENT_DEFINITION",
2131 | "description" : "Indicates the directive is valid on a field argument SDL definition.",
2132 | "isDeprecated" : false,
2133 | "deprecationReason" : null
2134 | }, {
2135 | "name" : "INTERFACE",
2136 | "description" : "Indicates the directive is valid on an interface SDL definition.",
2137 | "isDeprecated" : false,
2138 | "deprecationReason" : null
2139 | }, {
2140 | "name" : "UNION",
2141 | "description" : "Indicates the directive is valid on an union SDL definition.",
2142 | "isDeprecated" : false,
2143 | "deprecationReason" : null
2144 | }, {
2145 | "name" : "ENUM",
2146 | "description" : "Indicates the directive is valid on an enum SDL definition.",
2147 | "isDeprecated" : false,
2148 | "deprecationReason" : null
2149 | }, {
2150 | "name" : "ENUM_VALUE",
2151 | "description" : "Indicates the directive is valid on an enum value SDL definition.",
2152 | "isDeprecated" : false,
2153 | "deprecationReason" : null
2154 | }, {
2155 | "name" : "INPUT_OBJECT",
2156 | "description" : "Indicates the directive is valid on an input object SDL definition.",
2157 | "isDeprecated" : false,
2158 | "deprecationReason" : null
2159 | }, {
2160 | "name" : "INPUT_FIELD_DEFINITION",
2161 | "description" : "Indicates the directive is valid on an input object field SDL definition.",
2162 | "isDeprecated" : false,
2163 | "deprecationReason" : null
2164 | } ],
2165 | "possibleTypes" : null
2166 | } ],
2167 | "directives" : [ {
2168 | "name" : "include",
2169 | "description" : "Directs the executor to include this field or fragment only when the `if` argument is true",
2170 | "locations" : [ "FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT" ],
2171 | "args" : [ {
2172 | "name" : "if",
2173 | "description" : "Included when true.",
2174 | "type" : {
2175 | "kind" : "NON_NULL",
2176 | "name" : null,
2177 | "ofType" : {
2178 | "kind" : "SCALAR",
2179 | "name" : "Boolean",
2180 | "ofType" : null
2181 | }
2182 | },
2183 | "defaultValue" : null
2184 | } ],
2185 | "onOperation" : false,
2186 | "onFragment" : true,
2187 | "onField" : true
2188 | }, {
2189 | "name" : "skip",
2190 | "description" : "Directs the executor to skip this field or fragment when the `if`'argument is true.",
2191 | "locations" : [ "FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT" ],
2192 | "args" : [ {
2193 | "name" : "if",
2194 | "description" : "Skipped when true.",
2195 | "type" : {
2196 | "kind" : "NON_NULL",
2197 | "name" : null,
2198 | "ofType" : {
2199 | "kind" : "SCALAR",
2200 | "name" : "Boolean",
2201 | "ofType" : null
2202 | }
2203 | },
2204 | "defaultValue" : null
2205 | } ],
2206 | "onOperation" : false,
2207 | "onFragment" : true,
2208 | "onField" : true
2209 | }, {
2210 | "name" : "defer",
2211 | "description" : "This directive allows results to be deferred during execution",
2212 | "locations" : [ "FIELD" ],
2213 | "args" : [ ],
2214 | "onOperation" : false,
2215 | "onFragment" : false,
2216 | "onField" : true
2217 | }, {
2218 | "name" : "aws_auth",
2219 | "description" : "Directs the schema to enforce authorization on a field",
2220 | "locations" : [ "FIELD_DEFINITION" ],
2221 | "args" : [ {
2222 | "name" : "cognito_groups",
2223 | "description" : "List of cognito user pool groups which have access on this field",
2224 | "type" : {
2225 | "kind" : "LIST",
2226 | "name" : null,
2227 | "ofType" : {
2228 | "kind" : "SCALAR",
2229 | "name" : "String",
2230 | "ofType" : null
2231 | }
2232 | },
2233 | "defaultValue" : null
2234 | } ],
2235 | "onOperation" : false,
2236 | "onFragment" : false,
2237 | "onField" : false
2238 | }, {
2239 | "name" : "aws_subscribe",
2240 | "description" : "Tells the service which mutation triggers this subscription.",
2241 | "locations" : [ "FIELD_DEFINITION" ],
2242 | "args" : [ {
2243 | "name" : "mutations",
2244 | "description" : "List of mutations which will trigger this subscription when they are called.",
2245 | "type" : {
2246 | "kind" : "LIST",
2247 | "name" : null,
2248 | "ofType" : {
2249 | "kind" : "SCALAR",
2250 | "name" : "String",
2251 | "ofType" : null
2252 | }
2253 | },
2254 | "defaultValue" : null
2255 | } ],
2256 | "onOperation" : false,
2257 | "onFragment" : false,
2258 | "onField" : false
2259 | }, {
2260 | "name" : "aws_publish",
2261 | "description" : "Tells the service which subscriptions will be published to when this mutation is called. This directive is deprecated use @aws_susbscribe directive instead.",
2262 | "locations" : [ "FIELD_DEFINITION" ],
2263 | "args" : [ {
2264 | "name" : "subscriptions",
2265 | "description" : "List of subscriptions which will be published to when this mutation is called.",
2266 | "type" : {
2267 | "kind" : "LIST",
2268 | "name" : null,
2269 | "ofType" : {
2270 | "kind" : "SCALAR",
2271 | "name" : "String",
2272 | "ofType" : null
2273 | }
2274 | },
2275 | "defaultValue" : null
2276 | } ],
2277 | "onOperation" : false,
2278 | "onFragment" : false,
2279 | "onField" : false
2280 | }, {
2281 | "name" : "deprecated",
2282 | "description" : null,
2283 | "locations" : [ "FIELD_DEFINITION", "ENUM_VALUE" ],
2284 | "args" : [ {
2285 | "name" : "reason",
2286 | "description" : null,
2287 | "type" : {
2288 | "kind" : "SCALAR",
2289 | "name" : "String",
2290 | "ofType" : null
2291 | },
2292 | "defaultValue" : "\"No longer supported\""
2293 | } ],
2294 | "onOperation" : false,
2295 | "onFragment" : false,
2296 | "onField" : false
2297 | }, {
2298 | "name" : "aws_oidc",
2299 | "description" : "Tells the service this field/object has access authorized by an OIDC token.",
2300 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
2301 | "args" : [ ],
2302 | "onOperation" : false,
2303 | "onFragment" : false,
2304 | "onField" : false
2305 | }, {
2306 | "name" : "aws_lambda",
2307 | "description" : "Tells the service this field/object has access authorized by a Lambda Authorizer.",
2308 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
2309 | "args" : [ ],
2310 | "onOperation" : false,
2311 | "onFragment" : false,
2312 | "onField" : false
2313 | }, {
2314 | "name" : "aws_api_key",
2315 | "description" : "Tells the service this field/object has access authorized by an API key.",
2316 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
2317 | "args" : [ ],
2318 | "onOperation" : false,
2319 | "onFragment" : false,
2320 | "onField" : false
2321 | }, {
2322 | "name" : "aws_iam",
2323 | "description" : "Tells the service this field/object has access authorized by sigv4 signing.",
2324 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
2325 | "args" : [ ],
2326 | "onOperation" : false,
2327 | "onFragment" : false,
2328 | "onField" : false
2329 | }, {
2330 | "name" : "aws_cognito_user_pools",
2331 | "description" : "Tells the service this field/object has access authorized by a Cognito User Pools token.",
2332 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
2333 | "args" : [ {
2334 | "name" : "cognito_groups",
2335 | "description" : "List of cognito user pool groups which have access on this field",
2336 | "type" : {
2337 | "kind" : "LIST",
2338 | "name" : null,
2339 | "ofType" : {
2340 | "kind" : "SCALAR",
2341 | "name" : "String",
2342 | "ofType" : null
2343 | }
2344 | },
2345 | "defaultValue" : null
2346 | } ],
2347 | "onOperation" : false,
2348 | "onFragment" : false,
2349 | "onField" : false
2350 | } ]
2351 | }
2352 | }
2353 | }
--------------------------------------------------------------------------------
/src/graphql/subscriptions.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | // this is an auto generated file. This will be overwritten
3 |
4 | export const onCreateDevice = /* GraphQL */ `
5 | subscription OnCreateDevice {
6 | onCreateDevice {
7 | id
8 | name
9 | trackerName
10 | latitude
11 | longitude
12 | createdAt
13 | updatedAt
14 | }
15 | }
16 | `;
17 | export const onUpdateDevice = /* GraphQL */ `
18 | subscription OnUpdateDevice {
19 | onUpdateDevice {
20 | id
21 | name
22 | trackerName
23 | latitude
24 | longitude
25 | createdAt
26 | updatedAt
27 | }
28 | }
29 | `;
30 | export const onDeleteDevice = /* GraphQL */ `
31 | subscription OnDeleteDevice {
32 | onDeleteDevice {
33 | id
34 | name
35 | trackerName
36 | latitude
37 | longitude
38 | createdAt
39 | updatedAt
40 | }
41 | }
42 | `;
43 |
--------------------------------------------------------------------------------