New constructs a new graphql provider with given arguments
(cfg *config.Config, deps *Dependencies)
| 51 | |
| 52 | // New constructs a new graphql provider with given arguments |
| 53 | func New(cfg *config.Config, deps *Dependencies) (Provider, error) { |
| 54 | // TODO - Add any validation here for config and dependencies |
| 55 | g := &graphqlProvider{ |
| 56 | Config: cfg, |
| 57 | Dependencies: *deps, |
| 58 | } |
| 59 | return g, nil |
| 60 | } |
| 61 | |
| 62 | // graphqlProvider is the struct that provides resolver functions. |
| 63 | type graphqlProvider struct { |
no outgoing calls