| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1x 1x 1x 1x | 'use strict'
const filterArgs = module.exports = { }
const graphQl = require('graphql')
const jsonApi = require('../..')
filterArgs.generate = resource => {
const args = { }
const resourceConfig = jsonApi._resources[resource]
Object.keys(resourceConfig.attributes).forEach(attribute => {
args[attribute] = {
description: 'Filter string',
type: graphQl.GraphQLString
}
})
return args
}
|