-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sst build
is not working with AppSync
#228
Comments
Hi @romcok Thanks for reporting this! May I bother you to share a repo with a stripped-down code that can reproduce this? I will take a look at this today. |
Here is the minimal code to reproduce the problem https://github.com/romcok/sst-appsync-example. I'm not sure if it all works because I got stuck during the build process. |
Ah nice! Thanks for putting it together. I'm going to go get some sleep and then take a look at this. 💪 |
Hi again, import * as cdk from '@aws-cdk/core'
import * as appsync from '@aws-cdk/aws-appsync'
export const GraphQLSchema = (scope: cdk.Construct, apiId: string) =>
new appsync.CfnGraphQLSchema(scope, 'GraphQLSchema', {
apiId,
definition: `
schema {
query: Query
}
type Query {
hello: String
version: String
}`
}) So if you have trouble packing some kind of assets needed for CDK, try to find a suitable construct for this purpose. |
@romcok I was playing around with AppSync today. I didn't run into this issue. Here's my repo for reference. It's pretty basic. https://github.com/jayair/appsync-sst-app I'm fairly new to AppSync. Any idea why it worked for my case? |
Wow wow man, you solved it. Thank you both for your time, you saved a lot of ours and I've been keeping my fingers crossed for what you're doing. I've been watching you for a few years and your guide was my intro to the serverless world 🙏 I'll let you know if I find out where the problem was and you can add to the info that it also works with AppSync 💪 |
Wow! Really appreciate the kind words and support! Thank you! |
I'll close this for now. Feel free to reopen it when you figure out what was breaking it for you. |
Hi,
we have some problems with your framework to get working with AppSync. I think something is missing in the CDK/SST
synth mechanism and GraphQL schema is not copied to the .build directory during the build. It happens during
sst build
.We only need to copy one file to the .build directory. Would be great if it worked with this service as well. Any ideas? 🤷♂️
Here is the code wich isn't working:
And here is the error:
The text was updated successfully, but these errors were encountered: