Skip to content

Commit

Permalink
fix wrong generatedSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
abhimanyusinghgaur committed Sep 1, 2020
1 parent 844f34d commit 3a0c787
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions graphql/admin/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ func resolveUpdateGQLSchema(ctx context.Context, m schema.Mutation) (*resolve.Re
if _, err = schema.FromString(schHandler.GQLSchema()); err != nil {
return resolve.EmptyResult(m, err), false
}
newGQLSchema := input.Set.Schema
newDgraphSchema := schHandler.DGSchema()

resp, err := edgraph.UpdateGQLSchema(ctx, newGQLSchema, newDgraphSchema)
resp, err := edgraph.UpdateGQLSchema(ctx, input.Set.Schema, schHandler.DGSchema())
if err != nil {
return resolve.EmptyResult(m, err), false
}
Expand All @@ -70,8 +68,8 @@ func resolveUpdateGQLSchema(ctx context.Context, m schema.Mutation) (*resolve.Re
m.Name(): map[string]interface{}{
"gqlSchema": map[string]interface{}{
"id": query.UidToHex(resp.Uid),
"schema": newGQLSchema,
"generatedSchema": newDgraphSchema,
"schema": input.Set.Schema,
"generatedSchema": schHandler.GQLSchema(),
}}},
Field: m,
Err: nil,
Expand Down

0 comments on commit 3a0c787

Please sign in to comment.