I am trying to connect my react native mobile app with graphql server. For that, as the graphql client I am using Apollo Client. I hope to use AWS services and, I have a problem in selecting the suitable graphql server.
Can I use AWS AppSync instead of using a separate GraphQL server such as ApolloServer, Express GraphQL etc.
Yes, you can use AWS AppSync as a GraphQL server on AWS. AWS AppSync is an AWS service for creating your fully managed GraphQL API layers. Since, it is a managed service, which means you don't need to worry about provisioning a server for your backend.
I would suggest you to use Serverless framework to manage and deploy your AppSync application. Here is the link for you to get started and will probably give you a good idea how to use Serverless for AppSync applications.
https://www.serverless.com/guides/aws-appsync
Related
I have the "new" HTTP API with a DynamoDB and lambda, I want to provide support for my app to the macOS computers. Is it possible to use the HTTP API Gateway with Amplify? I only see an option for GraphQL and REST
Thaks
I'd like to use apollo graphql in a lambda and I found AppSync is for graphql and API Gateway is for REST. Do I have to use AppSync for that?
I also find out a library apollo-server-lambda which can be used with serverless but I don't want to use serverless because all my infrastructure code is written in Terraform. I don't want to bring another IaC library in my application.
So is there a way to use API Gateway with apollo graphql in lambda? If yes, how should I declare API Gateway route for that?
Not really. You can just use the API gateway, Lambda, and Apollo Server. Install the npm library apollo-server-lambda and Import the required modules.
The current version of Apollo Server Lambda: 2.17.0
You can create a GraphQL handler using the function createHandler provided by Apollo server Lambda.
I am not sure about how it is done using Terraform but you can just declare a route to your handler function via the API gateway.
Make sure your GET and POST requests route to the same handler.
Refer to this documentation for more details: https://www.apollographql.com/docs/apollo-server/deployment/lambda/
When using AWS AppSync as a backend GraphQL server, what are the advantages of using AppSync client on top of vue-apollo client? Can I just use vue-apollo to interact with my GraphQl server without using AppSync client?
Can you please share the specific use-cases or features looking for?
AppSync provides lot of the other features like real-time subscriptions, offline access, caching and enterprise security and fine-grained access control.
I've an AWS AppSync GraphQL endpoint with some DynamoDB tables and it is integrated with Cognito.
I've also developed a django application with graphql endpoint (graphene) and cognito integration that is deployed with zappa to a lambda function.
What is the best way to combine those two graphql endpoints, so that i can query them from one endpoint?
1- Appsync forwards requests to lambda with resolvers? (any examples?)
2- Intercept calls from api gateway and forward them to appsync? (less likely)
Thanks,
Alp
Does Amplify support the Offline capabilities outlined here:
https://docs.aws.amazon.com/appsync/latest/devguide/building-a-client-app-react.html#offline-settings
Should I set it up like this?
https://aws.github.io/aws-amplify/media/api_guide#configuration-for-graphql-server
Or for offline capabilities, do I have to use something like Apollo?
There is a difference between AWS Amplify and AWS App Sync.
AWS Amplify is a library for web and mobile developement in JavaScript providing better access to AWS services like Auth, Analytics, Storage, APIs, Caching.
AWS AppSync is a combination of service that works as a GraphQL server and SDK (for web, iOS and Android). This SDK extends Apollo Client to provide capabilities like Offline and Realtime synchronization out of the box.
So, to answer your question: AWS AppSync does provide offline via its SDK out of the box and you shouldn’t need to do anything specifically to set up that.