Skip to content

Commit f66f8e8

Browse files
committed
Replace deprecated directive method
1 parent 99c36dd commit f66f8e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

documentation/sdl-directives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class AuthorisationDirective implements SchemaDirectiveWiring {
7575

7676
@Override
7777
public GraphQLFieldDefinition onField(SchemaDirectiveWiringEnvironment<GraphQLFieldDefinition> environment) {
78-
String targetAuthRole = (String) environment.getDirective().getArgument("role").getArgumentValue().getValue();
78+
String targetAuthRole = (String) environment.getAppliedDirective().getArgument("role").getArgumentValue().getValue();
7979

8080
//
8181
// build a data fetcher that first checks authorisation roles before then calling the original data fetcher

versioned_docs/version-v22/sdl-directives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class AuthorisationDirective implements SchemaDirectiveWiring {
7575

7676
@Override
7777
public GraphQLFieldDefinition onField(SchemaDirectiveWiringEnvironment<GraphQLFieldDefinition> environment) {
78-
String targetAuthRole = (String) environment.getDirective().getArgument("role").getArgumentValue().getValue();
78+
String targetAuthRole = (String) environment.getAppliedDirective().getArgument("role").getArgumentValue().getValue();
7979

8080
//
8181
// build a data fetcher that first checks authorisation roles before then calling the original data fetcher

0 commit comments

Comments
 (0)