Commit 8546150 1 parent b31db1b commit 8546150 Copy full SHA for 8546150
File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,10 @@ type Schema struct {
39
39
// a query language. This includes schema and query parsing, and introspection.
40
40
type Parser interface {
41
41
// Returns true if the given string is an introspection request.
42
- IsIntrospectionRequest (request string ) bool
42
+ IsIntrospection (request string ) bool
43
43
44
44
// Executes the given introspection request.
45
- ExecuteIntrospectionRequest (request string ) * client.QueryResult
45
+ ExecuteIntrospection (request string ) * client.QueryResult
46
46
47
47
// Parses the given request, returning a strongly typed model of that request.
48
48
Parse (request string ) (* request.Request , []error )
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ func (db *db) ExecTransactionalQuery(
64
64
query string ,
65
65
txn datastore.Txn ,
66
66
) * client.QueryResult {
67
- if db .parser .IsIntrospectionRequest (query ) {
67
+ if db .parser .IsIntrospection (query ) {
68
68
return db .ExecIntrospection (query )
69
69
}
70
70
@@ -92,5 +92,5 @@ func (db *db) ExecTransactionalQuery(
92
92
}
93
93
94
94
func (db * db ) ExecIntrospection (query string ) * client.QueryResult {
95
- return db .parser .ExecuteIntrospectionRequest (query )
95
+ return db .parser .ExecuteIntrospection (query )
96
96
}
Original file line number Diff line number Diff line change @@ -45,12 +45,12 @@ func NewParser() (*parser, error) {
45
45
return p , nil
46
46
}
47
47
48
- func (p * parser ) IsIntrospectionRequest (request string ) bool {
48
+ func (p * parser ) IsIntrospection (request string ) bool {
49
49
// todo: This needs to be done properly https://github.com/sourcenetwork/defradb/issues/911
50
50
return strings .Contains (request , "IntrospectionQuery" )
51
51
}
52
52
53
- func (p * parser ) ExecuteIntrospectionRequest (request string ) * client.QueryResult {
53
+ func (p * parser ) ExecuteIntrospection (request string ) * client.QueryResult {
54
54
schema := p .schemaManager .Schema ()
55
55
params := gql.Params {Schema : * schema , RequestString : request }
56
56
r := gql .Do (params )
You can’t perform that action at this time.
0 commit comments