Skip to content

Commit a01cf88

Browse files
committed
validation (wip)
1 parent a3e1385 commit a01cf88

20 files changed

Lines changed: 228 additions & 10 deletions

src/main/java/graphql/introspection/Schema.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ public Object get(DataFetchingEnvironment environment) {
373373
.dataFetcher(new DataFetcher() {
374374
@Override
375375
public Object get(DataFetchingEnvironment environment) {
376-
return Arrays.asList(Directives.IncludeDirective, Directives.SkipDirective);
376+
return environment.getGraphQLSchema().getDirectives();
377377
}
378378
})
379379
.build())
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package graphql.language;
2+
3+
4+
public interface Node {
5+
}

src/main/java/graphql/language/SelectionSet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import java.util.ArrayList;
55
import java.util.List;
66

7-
public class SelectionSet {
7+
public class SelectionSet implements Node{
88

99
private final List<Selection> selections = new ArrayList<>();
1010

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package graphql.schema;
2+
3+
4+
public interface GraphQLCompositeType extends GraphQLType {
5+
}

src/main/java/graphql/schema/GraphQLEnumType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import java.util.List;
1010
import java.util.Map;
1111

12-
public class GraphQLEnumType implements GraphQLType, GraphQLInputType, GraphQLOutputType {
12+
public class GraphQLEnumType implements GraphQLType, GraphQLInputType, GraphQLOutputType,GraphQLUnmodifiedType {
1313

1414
private final String name;
1515
private final String description;

src/main/java/graphql/schema/GraphQLInputObjectType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import java.util.ArrayList;
55
import java.util.List;
66

7-
public class GraphQLInputObjectType implements GraphQLType, GraphQLInputType {
7+
public class GraphQLInputObjectType implements GraphQLType, GraphQLInputType, GraphQLUnmodifiedType {
88

99
private final String name;
1010

src/main/java/graphql/schema/GraphQLInterfaceType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import java.util.List;
99
import java.util.Map;
1010

11-
public class GraphQLInterfaceType implements GraphQLType, GraphQLOutputType, GraphQLFieldsContainer {
11+
public class GraphQLInterfaceType implements GraphQLType, GraphQLOutputType, GraphQLFieldsContainer, GraphQLCompositeType,GraphQLUnmodifiedType {
1212

1313
private final String name;
1414
private final String description;

src/main/java/graphql/schema/GraphQLList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package graphql.schema;
22

33

4-
public class GraphQLList implements GraphQLType, GraphQLInputType, GraphQLOutputType {
4+
public class GraphQLList implements GraphQLType, GraphQLInputType, GraphQLOutputType, GraphQLModifiedType {
55

66
private final GraphQLType wrappedType;
77

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package graphql.schema;
2+
3+
4+
public interface GraphQLModifiedType extends GraphQLType {
5+
6+
GraphQLType getWrappedType();
7+
}

src/main/java/graphql/schema/GraphQLNonNull.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package graphql.schema;
22

33

4-
public class GraphQLNonNull implements GraphQLType, GraphQLInputType, GraphQLOutputType {
4+
public class GraphQLNonNull implements GraphQLType, GraphQLInputType, GraphQLOutputType, GraphQLModifiedType {
55

66
private final GraphQLType wrappedType;
77

0 commit comments

Comments
 (0)