Skip to content

Commit

Permalink
update api
Browse files Browse the repository at this point in the history
Signed-off-by: Jat <[email protected]>
  • Loading branch information
jat001 committed Oct 23, 2023
1 parent 9e97cf2 commit b36b048
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func GraphQLError(message string) map[string][]map[string]string {
func GraphQL(c echo.Context) error {
schema, err := graphql.NewSchema(graphql.SchemaConfig{
Query: graphql.NewObject(graphql.ObjectConfig{
Name: "Query",
Name: "query",
Fields: graphql.Fields{
"history": historyQuery(),
},
Expand Down Expand Up @@ -64,6 +64,7 @@ func API(config *core.Config) {

e.Use(middleware.Logger())
e.Use(middleware.Recover())
e.Use(middleware.CORS())

e.POST("/graphql", GraphQL)

Expand Down

0 comments on commit b36b048

Please sign in to comment.