If you set your schema up as follows:
type ConfigValues {
SHOW_CUSTOM_SUBSCRIPTION: String!
SHOW_DD_SUBSCRIPTION: String!
SHOW_GRADIENT_SUBSCRIPTION: String!
SHOW_SOLID_SUBSCRIPTION: String!
}
type Query {
getConfigValues(configName: String!): ConfigValues
}
schema {
query: Query
}
With a resolver on getConfigValues with a request mapping template of:
{
"version": "2017-02-28",
"operation": "GetItem",
"key": {
"config_name": $util.dynamodb.toDynamoDBJson($ctx.args.configName),
}
}
And a response mapping template of:
$util.toJson($ctx.result.config_value)
Performing the following query:
query {
getConfigValues(configName: "COLOR_PALETTE") {
SHOW_CUSTOM_SUBSCRIPTION
SHOW_DD_SUBSCRIPTION
SHOW_GRADIENT_SUBSCRIPTION
SHOW_SOLID_SUBSCRIPTION
}
}
Will have the response of:
{
"data": {
"getConfigValues": {
"SHOW_CUSTOM_SUBSCRIPTION": "NO",
"SHOW_DD_SUBSCRIPTION": "NO",
"SHOW_GRADIENT_SUBSCRIPTION": "YES",
"SHOW_SOLID_SUBSCRIPTION": "NO"
}
}
}
This answer assumes that your Primary partition key of your DynamoDB table is set to be config_name.