Skip to content

Commit 33d045a

Browse files
committed
Updating enviroment to work with new lambda function
1 parent 4187fbe commit 33d045a

File tree

10 files changed

+227
-40
lines changed

10 files changed

+227
-40
lines changed

superformula-backend/.graphqlconfig.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ projects:
1010
codeGenTarget: typescript
1111
generatedFileName: src/API.ts
1212
docsFilePath: src/graphql
13+
extensions:
14+
amplify:
15+
version: 3

superformula-backend/amplify/backend/api/superformulabackend/cli-inputs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"gqlSchemaPath": "/Users/lamatheus.marques/Documents/personal-projects/superformula/test-web-stack/superformula-backend/amplify/backend/api/superformulabackend/schema.graphql",
77
"defaultAuthType": {
88
"mode": "API_KEY",
9-
"expirationTime": 40,
10-
"apiKeyExpirationDate": "2022-01-10T02:46:41.209Z",
9+
"expirationTime": 60,
10+
"apiKeyExpirationDate": "2022-01-30T23:47:41.841Z",
1111
"keyDescription": ""
1212
}
1313
}

superformula-backend/amplify/backend/api/superformulabackend/schema.graphql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@ type User @model {
1111
createdAt: AWSDateTime!
1212
updatedAt: AWSDateTime!
1313
}
14+
15+
type GetLocationQuery {
16+
latitude: Float
17+
longitude: Float
18+
}
19+
20+
type Query {
21+
getLocation(address: String!): GetLocationQuery
22+
@function(name: "getLocationDetails-${env}")
23+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"version": "1",
3+
"cognitoConfig": {
4+
"identityPoolName": "superformulabackendc1b223b8_identitypool_c1b223b8",
5+
"allowUnauthenticatedIdentities": false,
6+
"resourceNameTruncated": "superfc1b223b8",
7+
"userPoolName": "superformulabackendc1b223b8_userpool_c1b223b8",
8+
"autoVerifiedAttributes": [
9+
"email"
10+
],
11+
"mfaConfiguration": "OFF",
12+
"mfaTypes": [
13+
"SMS Text Message"
14+
],
15+
"smsAuthenticationMessage": "Your authentication code is {####}",
16+
"smsVerificationMessage": "Your verification code is {####}",
17+
"emailVerificationSubject": "Your verification code",
18+
"emailVerificationMessage": "Your verification code is {####}",
19+
"defaultPasswordPolicy": false,
20+
"passwordPolicyMinLength": 8,
21+
"passwordPolicyCharacters": [],
22+
"requiredAttributes": [
23+
"email"
24+
],
25+
"aliasAttributes": [],
26+
"userpoolClientGenerateSecret": false,
27+
"userpoolClientRefreshTokenValidity": 30,
28+
"userpoolClientWriteAttributes": [
29+
"email"
30+
],
31+
"userpoolClientReadAttributes": [
32+
"email"
33+
],
34+
"userpoolClientLambdaRole": "superfc1b223b8_userpoolclient_lambda_role",
35+
"userpoolClientSetAttributes": false,
36+
"sharedId": "c1b223b8",
37+
"resourceName": "superformulabackendc1b223b8",
38+
"authSelections": "identityPoolAndUserPool",
39+
"useDefault": "default",
40+
"userPoolGroupList": [],
41+
"serviceName": "Cognito",
42+
"usernameCaseSensitive": false,
43+
"useEnabledMfas": true
44+
}
45+
}

superformula-backend/amplify/backend/backend-config.json

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"defaultAuthentication": {
99
"authenticationType": "API_KEY",
1010
"apiKeyConfig": {
11-
"apiKeyExpirationDays": 40,
12-
"apiKeyExpirationDate": "2022-01-10T02:46:41.209Z",
11+
"apiKeyExpirationDays": 60,
12+
"apiKeyExpirationDate": "2022-01-30T23:47:41.841Z",
1313
"description": ""
1414
}
1515
},
@@ -25,5 +25,31 @@
2525
"service": "Lambda",
2626
"dependsOn": []
2727
}
28+
},
29+
"auth": {
30+
"superformulabackendc1b223b8": {
31+
"service": "Cognito",
32+
"providerPlugin": "awscloudformation",
33+
"dependsOn": [],
34+
"customAuth": false,
35+
"frontendAuthConfig": {
36+
"socialProviders": [],
37+
"usernameAttributes": [],
38+
"signupAttributes": [
39+
"EMAIL"
40+
],
41+
"passwordProtectionSettings": {
42+
"passwordPolicyMinLength": 8,
43+
"passwordPolicyCharacters": []
44+
},
45+
"mfaConfiguration": "OFF",
46+
"mfaTypes": [
47+
"SMS"
48+
],
49+
"verificationMechanisms": [
50+
"EMAIL"
51+
]
52+
}
53+
}
2854
}
2955
}

superformula-backend/amplify/backend/types/amplify-dependent-resources-ref.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,16 @@ export type AmplifyDependentResourcesAttributes = {
1313
"Region": "string",
1414
"LambdaExecutionRole": "string"
1515
}
16+
},
17+
"auth": {
18+
"superformulabackendc1b223b8": {
19+
"IdentityPoolId": "string",
20+
"IdentityPoolName": "string",
21+
"UserPoolId": "string",
22+
"UserPoolArn": "string",
23+
"UserPoolName": "string",
24+
"AppClientIDWeb": "string",
25+
"AppClientID": "string"
26+
}
1627
}
1728
}

superformula-backend/amplify/team-provider-info.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717
"mapboxApiAccessToken": "12345",
1818
"mapboxApiUrl": "https://api.mapbox.com/geocoding/v5",
1919
"deploymentBucketName": "amplify-superformulabackend-dev-234340-deployment",
20-
"s3Key": "amplify-builds/getLocationDetails-41376935326f736b7938-build.zip"
20+
"s3Key": "amplify-builds/getLocationDetails-476e57617a456f6c542b-build.zip"
2121
}
22+
},
23+
"auth": {
24+
"superformulabackendc1b223b8": {}
2225
}
2326
}
2427
}

superformula-backend/src/API.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ export type DeleteUserInput = {
8989
id: string,
9090
};
9191

92+
export type GetLocationQuery = {
93+
__typename: "GetLocationQuery",
94+
latitude?: Array< number | null > | null,
95+
longitude?: Array< number | null > | null,
96+
};
97+
9298
export type ModelUserFilterInput = {
9399
id?: ModelIDInput | null,
94100
name?: ModelStringInput | null,
@@ -178,6 +184,18 @@ export type DeleteUserMutation = {
178184
} | null,
179185
};
180186

187+
export type GetLocationQueryVariables = {
188+
address: string,
189+
};
190+
191+
export type GetLocationQuery = {
192+
getLocation?: {
193+
__typename: "GetLocationQuery",
194+
latitude?: Array< number | null > | null,
195+
longitude?: Array< number | null > | null,
196+
} | null,
197+
};
198+
181199
export type GetUserQueryVariables = {
182200
id: string,
183201
};

superformula-backend/src/graphql/queries.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
/* eslint-disable */
33
// this is an auto generated file. This will be overwritten
44

5+
export const getLocation = /* GraphQL */ `
6+
query GetLocation($address: String!) {
7+
getLocation(address: $address) {
8+
latitude
9+
longitude
10+
}
11+
}
12+
`;
513
export const getUser = /* GraphQL */ `
614
query GetUser($id: ID!) {
715
getUser(id: $id) {

superformula-backend/src/graphql/schema.json

Lines changed: 98 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@
1515
"name" : "Query",
1616
"description" : null,
1717
"fields" : [ {
18+
"name" : "getLocation",
19+
"description" : null,
20+
"args" : [ {
21+
"name" : "address",
22+
"description" : null,
23+
"type" : {
24+
"kind" : "NON_NULL",
25+
"name" : null,
26+
"ofType" : {
27+
"kind" : "SCALAR",
28+
"name" : "String",
29+
"ofType" : null
30+
}
31+
},
32+
"defaultValue" : null
33+
} ],
34+
"type" : {
35+
"kind" : "OBJECT",
36+
"name" : "GetLocationQuery",
37+
"ofType" : null
38+
},
39+
"isDeprecated" : false,
40+
"deprecationReason" : null
41+
}, {
1842
"name" : "getUser",
1943
"description" : null,
2044
"args" : [ {
@@ -81,6 +105,63 @@
81105
"interfaces" : [ ],
82106
"enumValues" : null,
83107
"possibleTypes" : null
108+
}, {
109+
"kind" : "OBJECT",
110+
"name" : "GetLocationQuery",
111+
"description" : null,
112+
"fields" : [ {
113+
"name" : "latitude",
114+
"description" : null,
115+
"args" : [ ],
116+
"type" : {
117+
"kind" : "LIST",
118+
"name" : null,
119+
"ofType" : {
120+
"kind" : "SCALAR",
121+
"name" : "Float",
122+
"ofType" : null
123+
}
124+
},
125+
"isDeprecated" : false,
126+
"deprecationReason" : null
127+
}, {
128+
"name" : "longitude",
129+
"description" : null,
130+
"args" : [ ],
131+
"type" : {
132+
"kind" : "LIST",
133+
"name" : null,
134+
"ofType" : {
135+
"kind" : "SCALAR",
136+
"name" : "Float",
137+
"ofType" : null
138+
}
139+
},
140+
"isDeprecated" : false,
141+
"deprecationReason" : null
142+
} ],
143+
"inputFields" : null,
144+
"interfaces" : [ ],
145+
"enumValues" : null,
146+
"possibleTypes" : null
147+
}, {
148+
"kind" : "SCALAR",
149+
"name" : "Float",
150+
"description" : "Built-in Float",
151+
"fields" : null,
152+
"inputFields" : null,
153+
"interfaces" : null,
154+
"enumValues" : null,
155+
"possibleTypes" : null
156+
}, {
157+
"kind" : "SCALAR",
158+
"name" : "String",
159+
"description" : "Built-in String",
160+
"fields" : null,
161+
"inputFields" : null,
162+
"interfaces" : null,
163+
"enumValues" : null,
164+
"possibleTypes" : null
84165
}, {
85166
"kind" : "OBJECT",
86167
"name" : "User",
@@ -200,15 +281,6 @@
200281
"interfaces" : null,
201282
"enumValues" : null,
202283
"possibleTypes" : null
203-
}, {
204-
"kind" : "SCALAR",
205-
"name" : "String",
206-
"description" : "Built-in String",
207-
"fields" : null,
208-
"inputFields" : null,
209-
"interfaces" : null,
210-
"enumValues" : null,
211-
"possibleTypes" : null
212284
}, {
213285
"kind" : "SCALAR",
214286
"name" : "AWSDate",
@@ -1427,15 +1499,6 @@
14271499
"interfaces" : null,
14281500
"enumValues" : null,
14291501
"possibleTypes" : null
1430-
}, {
1431-
"kind" : "SCALAR",
1432-
"name" : "Float",
1433-
"description" : "Built-in Float",
1434-
"fields" : null,
1435-
"inputFields" : null,
1436-
"interfaces" : null,
1437-
"enumValues" : null,
1438-
"possibleTypes" : null
14391502
}, {
14401503
"kind" : "INPUT_OBJECT",
14411504
"name" : "ModelBooleanInput",
@@ -2264,23 +2327,6 @@
22642327
"onOperation" : false,
22652328
"onFragment" : false,
22662329
"onField" : true
2267-
}, {
2268-
"name" : "deprecated",
2269-
"description" : null,
2270-
"locations" : [ "FIELD_DEFINITION", "ENUM_VALUE" ],
2271-
"args" : [ {
2272-
"name" : "reason",
2273-
"description" : null,
2274-
"type" : {
2275-
"kind" : "SCALAR",
2276-
"name" : "String",
2277-
"ofType" : null
2278-
},
2279-
"defaultValue" : "\"No longer supported\""
2280-
} ],
2281-
"onOperation" : false,
2282-
"onFragment" : false,
2283-
"onField" : false
22842330
}, {
22852331
"name" : "aws_subscribe",
22862332
"description" : "Tells the service which mutation triggers this subscription.",
@@ -2302,6 +2348,23 @@
23022348
"onOperation" : false,
23032349
"onFragment" : false,
23042350
"onField" : false
2351+
}, {
2352+
"name" : "deprecated",
2353+
"description" : null,
2354+
"locations" : [ "FIELD_DEFINITION", "ENUM_VALUE" ],
2355+
"args" : [ {
2356+
"name" : "reason",
2357+
"description" : null,
2358+
"type" : {
2359+
"kind" : "SCALAR",
2360+
"name" : "String",
2361+
"ofType" : null
2362+
},
2363+
"defaultValue" : "\"No longer supported\""
2364+
} ],
2365+
"onOperation" : false,
2366+
"onFragment" : false,
2367+
"onField" : false
23052368
}, {
23062369
"name" : "aws_cognito_user_pools",
23072370
"description" : "Tells the service this field/object has access authorized by a Cognito User Pools token.",

0 commit comments

Comments
 (0)