在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):serverless/serverless-graphql-blog开源软件地址(OpenSource Url):https://github.com/serverless/serverless-graphql-blog开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):
#serverless-graphql-blog This Serverless Framework Project creates a REST API for a basic blog structure, including Posts, Authors and Comments utilizing GraphQL and DynamoDB for persistent storage. What's unique about this implementation is the entire REST API consists of only 1 endpoint. Note: This project automatically creates 3 DynamoDB tables upon Enjoy, Install & DeployMake sure you have the most recent version of the Serverless Framework (0.5.x and higher) and you are using NodeV4 or greater.
Install this Serverless Project:
Install (top level) npm dependencies
View project summary:
Deploy the project's Function and Endpoint:
Querying with GraphiQLThe graphql-js endpoint provided in this Serverless Project is compatible with GraphiQL, a query visualization tool used with graphql-js. Usage with GraphiQL.app (an Electron wrapper around GraphiQL) is recommended and is shown below: Sample GraphQL queriesList of author names
Results
List of posts with id and title
Results
List of posts with id, title and nested author name
Results
List of posts with post, author and comments information (for a Post with no comments, i.e. comments:[])
Results
Sample GraphQL MutationsCreate Post
Results
Mutation ValidationValidations defined using graphql-custom-types in blog/lib/schema.js
Results
Introspection Query
Returns:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论