Package-level declarations

Types

FragmentAnalysis
Link copied to clipboard
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)

A simple data class that defines a fragment reference (by name), and whether or not it was defined with some graphql content.

data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)
data class FragmentAnalysis(val fragmentReference: String, val isDefined: Boolean)

A simple data class that defines a fragment reference (by name), and whether or not it was defined with some graphql content.

FragmentAnalyzer
Link copied to clipboard

A contract for something that can parse graphql content and provide a full analysis of what fragments are referenced, and whether the fragments are defined with the query.

A contract for something that can parse graphql content and provide a full analysis of what fragments are referenced, and whether the fragments are defined with the query.

FragmentPatcher
Link copied to clipboard
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)

This class will return a String containing fragment definitions. This String can then be appended to a GraphQL operation in order to have all referenced fragments fully defined, before sending it to the server. This allows a GraphQL operation to reference fragments, but have the definition of those fragments live outside of the file that the operation lives in.

class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)
class FragmentPatcher(defaultExtension: String, fragmentAnalyzer: FragmentAnalyzer = RegexFragmentAnalyzer(), logger: AbstractLogger)

This class will return a String containing fragment definitions. This String can then be appended to a GraphQL operation in order to have all referenced fragments fully defined, before sending it to the server. This allows a GraphQL operation to reference fragments, but have the definition of those fragments live outside of the file that the operation lives in.

GraphRegexUtil
Link copied to clipboard

This util class provides helpful methods for finding fragment and query information in a GraphQL String. It has a method for finding all references to fragments. Another method for finding all defined fragments, which may exist after a query. And a method to test whether the current GraphQL String contains a query.

This util class provides helpful methods for finding fragment and query information in a GraphQL String. It has a method for finding all references to fragments. Another method for finding all defined fragments, which may exist after a query. And a method to test whether the current GraphQL String contains a query.

GraphRegexUtilTest
Link copied to clipboard
class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)

The test methods in this class will run three times using the JUnit parameterized test mechanism. Whether we are dealing with an operation of type: "query", "mutation", or "subscription", the tests should pass.

class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)
class GraphRegexUtilTest(operation: Operation)

The test methods in this class will run three times using the JUnit parameterized test mechanism. Whether we are dealing with an operation of type: "query", "mutation", or "subscription", the tests should pass.

Operation
Link copied to clipboard
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
data class Operation(val typeStr: String, val nameStr: String)
RegexFragmentAnalyzer
Link copied to clipboard

An implementation of FragmentAnalyzer that simply uses regular expressions to find fragment references, and whether they are defined with the query.

RegexFragmentAnalyzerTest
Link copied to clipboard

The test methods in this class will run three times using the JUnit parameterized test mechanism. Whether we are dealing with an operation of type: "query", "mutation", or "subscription", the tests should pass.

The test methods in this class will run three times using the JUnit parameterized test mechanism. Whether we are dealing with an operation of type: "query", "mutation", or "subscription", the tests should pass.