Skip to content

Commit 22bcf43

Browse files
committed
Clean up API controller, remove generated bundle.js
1 parent 895f003 commit 22bcf43

File tree

2 files changed

+9
-46099
lines changed

2 files changed

+9
-46099
lines changed

src/GraphQL.GraphiQL/Controllers/GraphQLController.cs

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,9 @@ public GraphQLController()
1414
_schema = new StarWarsSchema();
1515
}
1616

17-
public ExecutionResult Get()
17+
public ExecutionResult Post(GraphQLQuery query)
1818
{
19-
return Execute(_schema, null, "{ hero { __typename name } }");
20-
}
21-
22-
public ExecutionResult Post()
23-
{
24-
return Execute(_schema, null, SchemaIntrospection.IntrospectionQuery);
25-
}
26-
27-
public ExecutionResult Post(string query)
28-
{
29-
return Execute(_schema, null, query);
19+
return Execute(_schema, null, query.Query);
3020
}
3121

3222
public ExecutionResult Execute(
@@ -37,9 +27,13 @@ public ExecutionResult Execute(
3727
Inputs inputs = null)
3828
{
3929
var executer = new DocumentExecuter();
40-
41-
var result = executer.Execute(schema, rootObject, query, operationName);
42-
return result;
30+
return executer.Execute(schema, rootObject, query, operationName);
4331
}
4432
}
33+
34+
public class GraphQLQuery
35+
{
36+
public string Query { get; set; }
37+
public string Variables { get; set; }
38+
}
4539
}

0 commit comments

Comments
 (0)