Skip to content

Commit 57ae1ee

Browse files
committed
Ruby: Add test for GraphQL remote flow sources
1 parent 1526fff commit 57ae1ee

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed
Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
graphqlSchemaObjectClass
22
| app/graphql/types/base_object.rb:2:3:4:5 | BaseObject |
33
| app/graphql/types/mutation_type.rb:2:3:4:5 | MutationType |
4-
| app/graphql/types/query_type.rb:2:3:45:5 | QueryType |
4+
| app/graphql/types/post.rb:1:1:5:5 | Post |
5+
| app/graphql/types/query_type.rb:2:3:63:5 | QueryType |
56
graphqlSchemaObjectFieldDefinition
67
| app/graphql/types/mutation_type.rb:2:3:4:5 | MutationType | app/graphql/types/mutation_type.rb:3:5:3:44 | call to field |
7-
| app/graphql/types/query_type.rb:2:3:45:5 | QueryType | app/graphql/types/query_type.rb:3:5:5:40 | call to field |
8-
| app/graphql/types/query_type.rb:2:3:45:5 | QueryType | app/graphql/types/query_type.rb:7:5:9:7 | call to field |
9-
| app/graphql/types/query_type.rb:2:3:45:5 | QueryType | app/graphql/types/query_type.rb:15:5:17:7 | call to field |
10-
| app/graphql/types/query_type.rb:2:3:45:5 | QueryType | app/graphql/types/query_type.rb:24:5:26:7 | call to field |
11-
| app/graphql/types/query_type.rb:2:3:45:5 | QueryType | app/graphql/types/query_type.rb:32:5:35:7 | call to field |
8+
| app/graphql/types/post.rb:1:1:5:5 | Post | app/graphql/types/post.rb:2:5:2:24 | call to field |
9+
| app/graphql/types/post.rb:1:1:5:5 | Post | app/graphql/types/post.rb:3:5:3:36 | call to field |
10+
| app/graphql/types/post.rb:1:1:5:5 | Post | app/graphql/types/post.rb:4:5:4:60 | call to field |
11+
| app/graphql/types/query_type.rb:2:3:63:5 | QueryType | app/graphql/types/query_type.rb:3:5:5:40 | call to field |
12+
| app/graphql/types/query_type.rb:2:3:63:5 | QueryType | app/graphql/types/query_type.rb:7:5:9:7 | call to field |
13+
| app/graphql/types/query_type.rb:2:3:63:5 | QueryType | app/graphql/types/query_type.rb:15:5:17:7 | call to field |
14+
| app/graphql/types/query_type.rb:2:3:63:5 | QueryType | app/graphql/types/query_type.rb:24:5:26:7 | call to field |
15+
| app/graphql/types/query_type.rb:2:3:63:5 | QueryType | app/graphql/types/query_type.rb:32:5:35:7 | call to field |
16+
| app/graphql/types/query_type.rb:2:3:63:5 | QueryType | app/graphql/types/query_type.rb:46:5:49:7 | call to field |
17+
| app/graphql/types/query_type.rb:2:3:63:5 | QueryType | app/graphql/types/query_type.rb:55:5:57:7 | call to field |
1218
graphqlResolveMethod
1319
| app/graphql/mutations/dummy.rb:9:5:12:7 | resolve |
1420
| app/graphql/resolvers/dummy_resolver.rb:10:5:13:7 | resolve |
@@ -23,24 +29,39 @@ graphqlLoadMethodRoutedParameter
2329
| app/graphql/resolvers/dummy_resolver.rb:6:5:8:7 | load_something | app/graphql/resolvers/dummy_resolver.rb:6:24:6:25 | id |
2430
graphqlFieldDefinitionMethodCall
2531
| app/graphql/types/mutation_type.rb:3:5:3:44 | call to field |
32+
| app/graphql/types/post.rb:2:5:2:24 | call to field |
33+
| app/graphql/types/post.rb:3:5:3:36 | call to field |
34+
| app/graphql/types/post.rb:4:5:4:60 | call to field |
2635
| app/graphql/types/query_type.rb:3:5:5:40 | call to field |
2736
| app/graphql/types/query_type.rb:7:5:9:7 | call to field |
2837
| app/graphql/types/query_type.rb:15:5:17:7 | call to field |
2938
| app/graphql/types/query_type.rb:24:5:26:7 | call to field |
3039
| app/graphql/types/query_type.rb:32:5:35:7 | call to field |
40+
| app/graphql/types/query_type.rb:46:5:49:7 | call to field |
41+
| app/graphql/types/query_type.rb:55:5:57:7 | call to field |
3142
graphqlFieldResolutionMethod
3243
| app/graphql/types/query_type.rb:10:5:13:7 | with_arg |
3344
| app/graphql/types/query_type.rb:18:5:22:7 | custom_method |
3445
| app/graphql/types/query_type.rb:27:5:30:7 | with_splat |
3546
| app/graphql/types/query_type.rb:36:5:40:7 | with_splat_and_named_arg |
47+
| app/graphql/types/query_type.rb:50:5:53:7 | with_enum |
48+
| app/graphql/types/query_type.rb:58:5:62:7 | with_nested_enum |
3649
graphqlFieldResolutionRoutedParameter
3750
| app/graphql/types/query_type.rb:10:5:13:7 | with_arg | app/graphql/types/query_type.rb:10:18:10:23 | number |
3851
| app/graphql/types/query_type.rb:18:5:22:7 | custom_method | app/graphql/types/query_type.rb:18:23:18:33 | blah_number |
39-
| app/graphql/types/query_type.rb:27:5:30:7 | with_splat | app/graphql/types/query_type.rb:27:20:27:25 | **args |
4052
| app/graphql/types/query_type.rb:36:5:40:7 | with_splat_and_named_arg | app/graphql/types/query_type.rb:36:34:36:37 | arg1 |
41-
| app/graphql/types/query_type.rb:36:5:40:7 | with_splat_and_named_arg | app/graphql/types/query_type.rb:36:41:36:46 | **rest |
4253
graphqlFieldResolutionDefinition
4354
| app/graphql/types/query_type.rb:10:5:13:7 | with_arg | app/graphql/types/query_type.rb:7:5:9:7 | call to field |
4455
| app/graphql/types/query_type.rb:18:5:22:7 | custom_method | app/graphql/types/query_type.rb:15:5:17:7 | call to field |
4556
| app/graphql/types/query_type.rb:27:5:30:7 | with_splat | app/graphql/types/query_type.rb:24:5:26:7 | call to field |
4657
| app/graphql/types/query_type.rb:36:5:40:7 | with_splat_and_named_arg | app/graphql/types/query_type.rb:32:5:35:7 | call to field |
58+
| app/graphql/types/query_type.rb:50:5:53:7 | with_enum | app/graphql/types/query_type.rb:46:5:49:7 | call to field |
59+
| app/graphql/types/query_type.rb:58:5:62:7 | with_nested_enum | app/graphql/types/query_type.rb:55:5:57:7 | call to field |
60+
graphqlRemoteFlowSources
61+
| app/graphql/mutations/dummy.rb:5:24:5:25 | id |
62+
| app/graphql/mutations/dummy.rb:9:17:9:25 | something |
63+
| app/graphql/resolvers/dummy_resolver.rb:6:24:6:25 | id |
64+
| app/graphql/resolvers/dummy_resolver.rb:10:17:10:25 | something |
65+
| app/graphql/types/query_type.rb:10:18:10:23 | number |
66+
| app/graphql/types/query_type.rb:18:23:18:33 | blah_number |
67+
| app/graphql/types/query_type.rb:36:34:36:37 | arg1 |

ruby/ql/test/library-tests/frameworks/graphql/GraphQL.ql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
private import codeql.ruby.frameworks.GraphQL
22
private import codeql.ruby.AST
3+
private import codeql.ruby.dataflow.RemoteFlowSources
34

45
query predicate graphqlSchemaObjectClass(GraphqlSchemaObjectClass cls) { any() }
56

@@ -34,3 +35,5 @@ query predicate graphqlFieldResolutionDefinition(
3435
) {
3536
meth.getDefinition() = def
3637
}
38+
39+
query predicate graphqlRemoteFlowSources(RemoteFlowSource src) { any() }

0 commit comments

Comments
 (0)