bmeg / grip

Graph Integration Platform
https://bmeg.github.io/grip
MIT License
24 stars 8 forks source link

Adding configuration for endpoints #307

Closed kellrott closed 8 months ago

kellrott commented 8 months ago

Adds --endpoint-config and -l flags to server command line to pass configuration parameters to endpoint plugins.

This changes the signature for an endpoint plug in to:

func NewHTTPHandler(client gripql.Client, config map[string]string) (http.Handler, error) 
matthewpeterkort commented 8 months ago
Screenshot 2024-03-20 at 3 43 22 PM

This PR yields a new non-fatal error for existing grip-endpoints plugins.

kellrott commented 8 months ago

It changes the function signature of the plugin methods. So they need to be upgraded. Example at https://github.com/bmeg/grip/blob/ac185a097d7442012a72f2a8f1054fc4630b2b70/endpoints/graphqlv2/handler.go#L32

matthewpeterkort commented 8 months ago

makes more sense. Thank you.