I'm getting up and running with the `graphql-stack...
# help
a
I'm getting up and running with the
graphql-stack
. leaving the rds database stack defaults as they are, i'm getting a
Copy code
\"message\":\"FATAL: database \\\"acme\\\" does not exist; SQLState: 3D000\"
it looks like the aurora instance was created successfully with the DB identifier
dev-acme-database-<cluster-id>
when i check in the aws console. checking the SST console I also am getting a "No RDS clusters in this app" message. do I need to change that
RDS_DATABASE
value inside the database stack
migrator
function?
t
that repo isn't entirely ready so there might be some issues
defaultDatabaseName
creates a db for you with that name
let me push latest on the starter
pushed - I do see an update where I renamed the RDS_DATABASE param
a
thanks, i'm gonna give a clean build a try from that update version. not sure if was intentional but in latest commit lookes the removal of
backend/migrations/base.js
was breaking the build
t
ah makes sense
a
the AUTH stack should create a cognito user pool right?
t
Yeah
a
on a fresh build, looks like an issue parsing the todos query. not familiar w/ how gql sends queries via http but this seems correct;
Copy code
{
  "query": "query Todos {\n  session {\n    currentUser {\n      todos {\n        id\n        title\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}",
  "operationName": "Todos",
  "variables": {}
}
its sending a
POST
to the correct url and returning a 500. in logs seeing
Copy code
1bf34b92-5449-4f10-8694-3a34663ceee6 ERROR TypeError: Cannot read properties of undefined (reading 'method')
 /home/alan/dev/projects/graphql-stack/node_modules/@serverless-stack/node/dist/esm/graphql.js:12
            method: event.requestContext.http.method,
                                              ^

TypeError: Cannot read properties of undefined (reading 'method')
    at Runtime.handler2 (/home/alan/dev/projects/graphql-stack/node_modules/@serverless-stack/node/dist/esm/graphql.js:12:47)
    at Runtime.handleOnce (/home/alan/dev/projects/graphql-stack/node_modules/@serverless-stack/aws-lambda-ric/src/Runtime/Runtime.ts:77:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
t
In the graphql construct can you set
Copy code
defaultPayloadFormatVersion: sst.ApiPayloadFormatVersion.V2,
a
worked thx
it'd be sweet to have a way to save queries like in datagrip
t
yeah we need a query history tab
a
just documenting little stuff i run into, in the current repo there's two resolver-types generated files. the
TodoResolver
is importing from
backend/functions/graphql/resolvers/types.ts
but codegen is creating/updating
backend/services./graphql/resolvers/types.ts
so prolly wanna delete that first one
using the
Parameter.use
function on the API stack it looks like it's hitting a limit of max 10 parameter names it can read at a time:
Copy code
1a5b9c55-27a9-4912-8cb9-e1d19ab597bb REQUEST dev-mangrove-api-graphqlLambdaGETE703A5DF-vntYNhncW5zU [functions/graphql/graphql.handler] invoked by API POST /
Unhandled Promise Rejection 	{"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"ValidationException: 1 validation error detected: Value '[/mangrove/dev/BUCKET, /mangrove/dev/RDS_SECRET, /mangrove/dev/RDS_ARN, /mangrove/dev/RDS_DATABASE, /mangrove/dev/COGNITO_USER_POOL_ID, /mangrove/dev/MY_SPECIAL_CONFIG, /mangrove/dev/DYNAMO_TABLE, /mangrove/dev/PLAID_CLIENT_ID, /mangrove/dev/PLAID_SECRET, /mangrove/dev/SLACK_ID, /mangrove/dev/SLACK_SECRET]' at 'names' failed to satisfy constraint: Member must have length less than or equal to 10.","reason":"ValidationException: 1 validation error detected: Value '[/mangrove/dev/BUCKET, /mangrove/dev/RDS_SECRET, /mangrove/dev/RDS_ARN, /mangrove/dev/RDS_DATABASE, /mangrove/dev/COGNITO_USER_POOL_ID, /mangrove/dev/MY_SPECIAL_CONFIG, /mangrove/dev/DYNAMO_TABLE, /mangrove/dev/PLAID_CLIENT_ID, /mangrove/dev/PLAID_SECRET, /mangrove/dev/SLACK_ID, /mangrove/dev/SLACK_SECRET]' at 'names' failed to satisfy constraint: Member must have length less than or equal to 10.","promise":{},"stack":["Runtime.UnhandledPromiseRejection: ValidationException: 1 validation error detected: Value '[/mangrove/dev/BUCKET, /mangrove/dev/RDS_SECRET, /mangrove/dev/RDS_ARN, /mangrove/dev/RDS_DATABASE, /mangrove/dev/COGNITO_USER_POOL_ID, /mangrove/dev/MY_SPECIAL_CONFIG, /mangrove/dev/DYNAMO_TABLE, /mangrove/dev/PLAID_CLIENT_ID, /mangrove/dev/PLAID_SECRET, /mangrove/dev/SLACK_ID, /mangrove/dev/SLACK_SECRET]' at 'names' failed to satisfy constraint: Member must have length less than or equal to 10.","    at process.<anonymous> (/home/alan/dev/projects/graphql-stack/node_modules/@serverless-stack/aws-lambda-ric/src/index.ts:48:19)","    at process.emit (node:events:390:28)","    at process.emit (node:domain:475:12)","    at emit (node:internal/process/promises:136:22)","    at processPromiseRejections (node:internal/process/promises:242:25)","    at processTicksAndRejections (node:internal/process/task_queues:97:32)"]}
i can delete some of the RDS stuff as a work around but is there a way to have more than 10 values there?
t
I fixed this in the newest version of
@serverless-stack-slack/node
it'll batch 10 at a time
check the latest template too a few things have changed
a
sweet thx
me seeing the new functional stacks is guy at 1:00 lol

https://youtu.be/AB3swE4D-Qw?t=62

t
hahah
we still goin