forked from graphql-java-kickstart/graphql-java-servlet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Request-scoped
Instrumentation
s with GraphQLContext
- Loading branch information
1 parent
184025b
commit 60f1093
Showing
5 changed files
with
59 additions
and
12 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/main/java/graphql/servlet/DefaultInstrumentationProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package graphql.servlet; | ||
|
||
import graphql.execution.instrumentation.Instrumentation; | ||
|
||
public class DefaultInstrumentationProvider implements InstrumentationProvider { | ||
|
||
private final Instrumentation instrumentation; | ||
|
||
public DefaultInstrumentationProvider() { | ||
this(null); | ||
} | ||
|
||
public DefaultInstrumentationProvider(Instrumentation instrumentation) { | ||
this.instrumentation = instrumentation; | ||
} | ||
|
||
@Override | ||
public Instrumentation getInstrumentation() { | ||
return instrumentation; | ||
} | ||
|
||
@Override | ||
public Instrumentation getInstrumentation(GraphQLContext context) { | ||
return getInstrumentation(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters