在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):graphql-compose/graphql-compose-aws开源软件地址(OpenSource Url):https://github.com/graphql-compose/graphql-compose-aws开源编程语言(OpenSource Language):TypeScript 94.2%开源软件介绍(OpenSource Introduction):graphql-compose-awsThis module expose AWS Cloud API via GraphQL.
Generated Schema Introspection in SDL format can be found here (more than 10k types, ~2MB). AWS SDK GraphQLSupported all AWS SDK versions via official aws-sdk js client. Internally it generates Types and FieldConfigs from AWS SDK configs. You may put this generated types to any GraphQL Schema. import { GraphQLSchema, GraphQLObjectType } from 'graphql';
import awsSDK from 'aws-sdk';
import { AwsApiParser } from 'graphql-compose-aws';
const awsApiParser = new AwsApiParser({
awsSDK,
});
const schema = new GraphQLSchema({
query: new GraphQLObjectType({
name: 'Query',
fields: {
// Full API
aws: awsApiParser.getFieldConfig(),
// Partial API with desired services
s3: awsApiParser.getService('s3').getFieldConfig(),
ec2: awsApiParser.getService('ec2').getFieldConfig(),
},
}),
});
export default schema; Full code examples Installationyarn add graphql graphql-compose aws-sdk graphql-compose-aws
// or
npm install graphql graphql-compose aws-sdk graphql-compose-aws --save Modules Screenshots
Get List of EC2 instances from
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论