Hey everyone I have 2 questions about the `AppSync...
# help
s
Hey everyone I have 2 questions about the
AppSyncApi
1. My company is requiring all resources in a stack to follow a particular structure. I know you added
stackName
to the StackProps to allow for this but it doesn't seem to propagate to the
AppSyncApi
, just wondering if there is a way to do this? 2. Is it possible to create a custom
graphqlUrl
? At the moment, it is readonly with no
set
method Thanks for any help 🙂
t
are you saying the automatically generated name for the appsync api isn't good?
s
It's a little restrictive. My company enforces a particular naming convention so having an automated name doesn't work. For things like
Lambdas
the name can be custom using the
stackName
property but it doesn't seem possible to do the same for an AppSync api
t
does this help:
Copy code
const api = new AppSyncApi(stack, "Api", {
    cdk: {
      graphqlApi: {
        name: "whatever"
      }
    },
  });
s
That worked 🙂
f
Is it possible to create a custom
graphqlUrl
@Stiofán Ó Lorcáin do you mean using custom domain? Here’s an example https://docs.serverless-stack.com/constructs/AppSyncApi#custom-domains
s
Thanks 🙂 I didn't see that in the type definitions but this is exactly what I was looking for.