graphql-go / graphql-go/graphql
How to take metro in graphql out of the solve?
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 845
- PR merge metrics
- No merged PRs in 30d
Description
I'm having the following problem, I need to dynamically create an object type from the data I get from the database.
However I need the args parameter of the grapqh solving function.
```
import listResolvers from "../resolvers/listResolvers"
import listType from "../types/listType"
const listSchema = {
list: {
type: listType.listType(),
args: {
schema: {
type: new GraphQLNonNull(GraphQLString)
},
},
resolve: async (_, args) => {
return await listResolvers.get(args.schema)
},
}
}
```
my listType() function already creates the type dynamically, but as I said, I need the parameter that is passed in the graphql query
if it were an APIREST it was only the req.params within the function that worked
how to do something like that here in grapqhQl ???
Contributor guide
Assessment
This issue has not been assessed yet.