Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
7a3d03f
Add JSpecify agent team orchestrator prompt
claude Feb 28, 2026
b30585a
Move to .claude folder
dondonz Feb 28, 2026
18cd241
Add JSpecify annotations to QueryComplexityCalculator
dondonz Feb 28, 2026
fc88122
Add JSpecify annotations to AbortExecutionException
dondonz Feb 28, 2026
d71b245
Add JSpecify annotations to ConditionalNodeDecision
dondonz Feb 28, 2026
f79e9ea
Add JSpecify annotations to AsyncExecutionStrategy
dondonz Feb 28, 2026
3194a43
Add JSpecify annotations to QueryComplexityInfo
dondonz Feb 28, 2026
119d6dd
Add JSpecify annotations to AsyncSerialExecutionStrategy
dondonz Feb 28, 2026
ce144ba
Add JSpecify annotations to QueryDepthInfo
dondonz Feb 28, 2026
7765059
Add JSpecify annotations to CoercedVariables
dondonz Feb 28, 2026
7c8569a
Add JSpecify annotations to QueryReducer
dondonz Feb 28, 2026
6801331
Add JSpecify annotations to QueryAppliedDirective
dondonz Feb 28, 2026
6035167
Add JSpecify annotations to DataFetcherExceptionHandlerParameters
dondonz Feb 28, 2026
dfae148
Add JSpecify annotations to DataFetcherExceptionHandlerResult
dondonz Feb 28, 2026
460ee6b
Add JSpecify annotations to QueryTransformer
dondonz Feb 28, 2026
4427846
Add JSpecify annotations to DefaultValueUnboxer
dondonz Feb 28, 2026
32ecef7
Add JSpecify annotations to QueryAppliedDirectiveArgument
dondonz Feb 28, 2026
f223706
Add JSpecify annotations to QueryTraversalOptions
dondonz Feb 28, 2026
bfe03d0
Add JSpecify annotations to QueryVisitor
dondonz Feb 28, 2026
8b7d7a2
Add JSpecify annotations to ExecutionContext
dondonz Feb 28, 2026
1d3a502
Add JSpecify annotations to ExecutionId
dondonz Feb 28, 2026
ed60978
Add JSpecify annotations to QueryDirectives
dondonz Feb 28, 2026
24aa942
Add JSpecify annotations to QueryVisitorFieldArgumentEnvironment
dondonz Feb 28, 2026
d92048b
Add JSpecify annotations to QueryVisitorFieldArgumentInputValue
dondonz Feb 28, 2026
1ebd551
Add JSpecify annotations to FieldValidationInstrumentation
dondonz Feb 28, 2026
c3bda94
Add JSpecify annotations to QueryVisitorFieldArgumentValueEnvironment
dondonz Feb 28, 2026
560b28d
Add JSpecify annotations to SimpleFieldValidation
dondonz Feb 28, 2026
b540dbb
Add JSpecify annotations to InstrumentationCreateStateParameters
dondonz Feb 28, 2026
e54951c
Add JSpecify annotations to ExecutionStepInfo
dondonz Feb 28, 2026
f9c46df
Add JSpecify annotations to QueryVisitorFieldEnvironment
dondonz Feb 28, 2026
f99d27b
Add JSpecify annotations to InstrumentationExecuteOperationParameters
dondonz Feb 28, 2026
52a1a56
Add JSpecify annotations to QueryVisitorFragmentDefinitionEnvironment
dondonz Feb 28, 2026
6caa99b
Add JSpecify annotations to QueryVisitorFragmentSpreadEnvironment
dondonz Feb 28, 2026
37f4c59
Add JSpecify annotations to QueryVisitorInlineFragmentEnvironment
dondonz Feb 28, 2026
87e0c39
Add JSpecify annotations to QueryVisitorStub
dondonz Feb 28, 2026
a559997
Add JSpecify annotations to InstrumentationExecutionParameters
dondonz Feb 28, 2026
fd7834c
Add JSpecify annotations to InstrumentationExecutionStrategyParameters
dondonz Feb 28, 2026
760c033
Add JSpecify annotations to ExecutionStrategyParameters
dondonz Feb 28, 2026
0a64cb3
Add JSpecify annotations to InstrumentationFieldCompleteParameters
dondonz Feb 28, 2026
4529690
Add JSpecify annotations to FetchedValue
dondonz Feb 28, 2026
6286c17
Add JSpecify annotations to InstrumentationFieldFetchParameters
dondonz Feb 28, 2026
8df475d
Add JSpecify annotations to InstrumentationFieldParameters
dondonz Feb 28, 2026
1f8ce61
Add JSpecify annotations to FieldValueInfo
dondonz Feb 28, 2026
63677a1
Add JSpecify annotations to InstrumentationValidationParameters
dondonz Feb 28, 2026
bea6679
Add JSpecify annotations to InputMapDefinesTooManyFieldsException
dondonz Feb 28, 2026
0b6534c
Add JSpecify annotations to TracingInstrumentation
dondonz Feb 28, 2026
7197bd9
Add JSpecify annotations to ValueTraverser
dondonz Feb 28, 2026
016e560
Add JSpecify annotations to MergedSelectionSet
dondonz Feb 28, 2026
d372306
Add JSpecify annotations to MissingRootTypeException
dondonz Feb 28, 2026
9063da8
Add JSpecify annotations to TracingSupport
dondonz Feb 28, 2026
df504d2
Add JSpecify annotations to NonNullableValueCoercedAsNullException
dondonz Feb 28, 2026
bc5689f
Add JSpecify annotations to NormalizedVariables
dondonz Feb 28, 2026
9de2bea
Add JSpecify annotations to PreparsedDocumentEntry
dondonz Feb 28, 2026
4b69632
Add JSpecify annotations to OneOfNullValueException
dondonz Feb 28, 2026
8bb5d40
Add JSpecify annotations to ApolloPersistedQuerySupport
dondonz Feb 28, 2026
11d09ce
Add JSpecify annotations to OneOfTooManyKeysException
dondonz Feb 28, 2026
3d4e99f
Add JSpecify annotations to InMemoryPersistedQueryCache
dondonz Feb 28, 2026
1154e30
Add JSpecify annotations to ResultNodesInfo
dondonz Feb 28, 2026
45ed448
Add JSpecify annotations to PersistedQueryCacheMiss
dondonz Feb 28, 2026
d7d5a82
Add JSpecify annotations to PersistedQueryIdInvalid
dondonz Feb 28, 2026
100c2cd
Add JSpecify annotations to PersistedQueryNotFound
dondonz Feb 28, 2026
4c004a1
Add JSpecify annotations to ResultPath
dondonz Feb 28, 2026
3e190f3
Add JSpecify annotations to DelegatingSubscription
dondonz Feb 28, 2026
e540440
Add JSpecify annotations to SimpleDataFetcherExceptionHandler
dondonz Feb 28, 2026
e9fd9e9
Add JSpecify annotations to SubscriptionPublisher
dondonz Feb 28, 2026
76f195c
Add JSpecify annotations to SubscriptionExecutionStrategy
dondonz Feb 28, 2026
9db1bde
Add JSpecify annotations to UnknownOperationException
dondonz Feb 28, 2026
2529914
Add JSpecify annotations to UnresolvedTypeException
dondonz Feb 28, 2026
b3563cf
Review fixes: correct JSpecify annotations for Wave 1 classes
dondonz Feb 28, 2026
30581c8
Remove annotated Wave 1 classes from JSpecify exemption list
dondonz Mar 1, 2026
bb25aed
Clarify jspecify-annotate prompt: public API only, fix exemption cleanup
dondonz Mar 1, 2026
0a77532
Merge branch 'master' into claude/agent-team-jspecify-Frd74
dondonz Mar 1, 2026
d018b2d
Merge branch 'master' into claude/agent-team-jspecify-Frd74
dondonz Mar 7, 2026
fbe0cac
Address comments
dondonz Mar 22, 2026
9dfc436
Merge branch 'master' into claude/agent-team-jspecify-Frd74
dondonz Mar 22, 2026
0c5cf94
Adjust for new operation directives
dondonz Mar 22, 2026
087e136
Fix failing tests: update PreparsedDocumentEntry test and remove anno…
dondonz Mar 23, 2026
cb36b21
Merge branch 'master' into claude/agent-team-jspecify-Frd74
dondonz Mar 24, 2026
02401d5
Fix NullAway error: assert document non-null at assignment in GraphQL…
dondonz Mar 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/graphql/ExceptionWhileDataFetching.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ExceptionWhileDataFetching implements GraphQLError {
private final List<SourceLocation> locations;
private final @Nullable Map<String, Object> extensions;

public ExceptionWhileDataFetching(ResultPath path, Throwable exception, SourceLocation sourceLocation) {
public ExceptionWhileDataFetching(ResultPath path, Throwable exception, @Nullable SourceLocation sourceLocation) {
this.path = assertNotNull(path).toList();
this.exception = assertNotNull(exception);
this.locations = Collections.singletonList(sourceLocation);
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/graphql/GraphQL.java
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ private CompletableFuture<ExecutionResult> parseValidateAndExecute(ExecutionInpu
return CompletableFuture.completedFuture(new ExecutionResultImpl(preparsedDocumentEntry.getErrors()));
}
try {
return execute(Assert.assertNotNull(executionInputRef.get()), preparsedDocumentEntry.getDocument(), graphQLSchema, instrumentationState, engineRunningState, profiler);
return execute(Assert.assertNotNull(executionInputRef.get()), assertNotNull(preparsedDocumentEntry.getDocument(), "document must not be null"), graphQLSchema, instrumentationState, engineRunningState, profiler);
} catch (AbortExecutionException e) {
return CompletableFuture.completedFuture(e.toExecutionResult());
}
Expand All @@ -565,14 +565,14 @@ private PreparsedDocumentEntry parseAndValidate(AtomicReference<ExecutionInput>
if (parseResult.isFailure()) {
return new PreparsedDocumentEntry(assertNotNull(parseResult.getSyntaxException(), "Parse result syntax exception cannot be null when failed").toInvalidSyntaxError());
} else {
final Document document = parseResult.getDocument();
final Document document = assertNotNull(parseResult.getDocument(), "Document cannot be null when parse succeeded");
// they may have changed the document and the variables via instrumentation so update the reference to it
executionInput = executionInput.transform(builder -> builder.variables(parseResult.getVariables()));
executionInputRef.set(executionInput);

final List<ValidationError> errors;
try {
errors = validate(executionInput, assertNotNull(document, "Document cannot be null when parse succeeded"), graphQLSchema, instrumentationState);
errors = validate(executionInput, document, graphQLSchema, instrumentationState);
} catch (GoodFaithIntrospectionExceeded e) {
return new PreparsedDocumentEntry(document, List.of(e.toBadFaithError()));
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/graphql/UnresolvedTypeError.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ private String mkMessage(ResultPath path, UnresolvedTypeException exception, Exe
return format("Can't resolve '%s'. Abstract type '%s' must resolve to an Object type at runtime for field '%s.%s'. %s",
path,
exception.getInterfaceOrUnionType().getName(),
simplePrint(info.getParent().getUnwrappedNonNullType()),
info.getFieldDefinition().getName(),
simplePrint(assertNotNull(info.getParent(), "executionStepInfo parent must not be null").getUnwrappedNonNullType()),
assertNotNull(info.getFieldDefinition(), "fieldDefinition must not be null").getName(),
exception.getMessage());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import graphql.execution.instrumentation.SimplePerformantInstrumentation;
import graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;

import java.util.function.Function;

Expand Down Expand Up @@ -84,7 +85,7 @@ QueryTraverser newQueryTraverser(ExecutionContext executionContext) {
.build();
}

private int getPathLength(QueryVisitorFieldEnvironment path) {
private int getPathLength(@Nullable QueryVisitorFieldEnvironment path) {
int length = 1;
while (path != null) {
path = path.getParentEnvironment();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import graphql.execution.CoercedVariables;
import graphql.language.Document;
import graphql.schema.GraphQLSchema;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.NullUnmarked;
import org.jspecify.annotations.Nullable;

import java.util.LinkedHashMap;
import java.util.Map;
Expand All @@ -16,12 +19,13 @@
* into it.
*/
@PublicApi
@NullMarked
public class QueryComplexityCalculator {

private final FieldComplexityCalculator fieldComplexityCalculator;
private final GraphQLSchema schema;
private final Document document;
private final String operationName;
private final @Nullable String operationName;
private final CoercedVariables variables;

public QueryComplexityCalculator(Builder builder) {
Expand Down Expand Up @@ -95,6 +99,7 @@ public static Builder newCalculator() {
return new Builder();
}

@NullUnmarked
public static class Builder {
private FieldComplexityCalculator fieldComplexityCalculator;
private GraphQLSchema schema;
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/graphql/analysis/QueryComplexityInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
import graphql.PublicApi;
import graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters;
import graphql.execution.instrumentation.parameters.InstrumentationValidationParameters;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import org.jspecify.annotations.NullUnmarked;

/**
* The query complexity info.
*/
@PublicApi
@NullMarked
public class QueryComplexityInfo {

private final int complexity;
private final InstrumentationValidationParameters instrumentationValidationParameters;
private final InstrumentationExecuteOperationParameters instrumentationExecuteOperationParameters;
private final @Nullable InstrumentationValidationParameters instrumentationValidationParameters;
private final @Nullable InstrumentationExecuteOperationParameters instrumentationExecuteOperationParameters;

private QueryComplexityInfo(Builder builder) {
this.complexity = builder.complexity;
Expand All @@ -35,7 +38,7 @@ public int getComplexity() {
*
* @return the instrumentation validation parameters.
*/
public InstrumentationValidationParameters getInstrumentationValidationParameters() {
public @Nullable InstrumentationValidationParameters getInstrumentationValidationParameters() {
return instrumentationValidationParameters;
}

Expand All @@ -44,7 +47,7 @@ public InstrumentationValidationParameters getInstrumentationValidationParameter
*
* @return the instrumentation execute operation parameters.
*/
public InstrumentationExecuteOperationParameters getInstrumentationExecuteOperationParameters() {
public @Nullable InstrumentationExecuteOperationParameters getInstrumentationExecuteOperationParameters() {
return instrumentationExecuteOperationParameters;
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/graphql/analysis/QueryDepthInfo.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package graphql.analysis;

import graphql.PublicApi;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.NullUnmarked;

/**
* The query depth info.
*/
@PublicApi
@NullMarked
public class QueryDepthInfo {

private final int depth;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/graphql/analysis/QueryReducer.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package graphql.analysis;

import graphql.PublicApi;
import org.jspecify.annotations.NullMarked;

/**
* Used by {@link QueryTraverser} to reduce the fields of a Document (or part of it) to a single value.
Expand All @@ -10,6 +11,7 @@
* See {@link QueryTraverser#reducePostOrder(QueryReducer, Object)} and {@link QueryTraverser#reducePreOrder(QueryReducer, Object)}
*/
@PublicApi
@NullMarked
@FunctionalInterface
public interface QueryReducer<T> {

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/graphql/analysis/QueryTransformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import java.util.LinkedHashMap;
import java.util.Map;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.NullUnmarked;

import static graphql.Assert.assertNotNull;
Expand All @@ -31,6 +32,7 @@
* visitField calls.
*/
@PublicApi
@NullMarked
public class QueryTransformer {

private final Node root;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/graphql/analysis/QueryTraversalOptions.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package graphql.analysis;

import graphql.PublicApi;
import org.jspecify.annotations.NullMarked;

/**
* This options object controls how {@link QueryTraverser} works
*/
@PublicApi
@NullMarked
public class QueryTraversalOptions {

private final boolean coerceFieldArguments;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/graphql/analysis/QueryVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import graphql.PublicApi;
import graphql.util.TraversalControl;
import org.jspecify.annotations.NullMarked;

/**
* Used by {@link QueryTraverser} to visit the nodes of a Query.
* <p>
* How this happens in detail (pre vs post-order for example) is defined by {@link QueryTraverser}.
*/
@PublicApi
@NullMarked
public interface QueryVisitor {

void visitField(QueryVisitorFieldEnvironment queryVisitorFieldEnvironment);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLSchema;
import graphql.util.TraverserContext;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;

import java.util.Map;

@PublicApi
@NullMarked
public interface QueryVisitorFieldArgumentEnvironment {

GraphQLSchema getSchema();
Expand All @@ -21,7 +24,7 @@ public interface QueryVisitorFieldArgumentEnvironment {

Argument getArgument();

Object getArgumentValue();
@Nullable Object getArgumentValue();

Map<String, Object> getVariables();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,25 @@
import graphql.language.Value;
import graphql.schema.GraphQLInputType;
import graphql.schema.GraphQLInputValueDefinition;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;

/**
* This describes the tree structure that forms from a argument input type,
* especially with `input ComplexType { ....}` types that might in turn contain other complex
* types and hence form a tree of values.
*/
@PublicApi
@NullMarked
public interface QueryVisitorFieldArgumentInputValue {

QueryVisitorFieldArgumentInputValue getParent();
@Nullable QueryVisitorFieldArgumentInputValue getParent();

GraphQLInputValueDefinition getInputValueDefinition();

String getName();

GraphQLInputType getInputType();

Value getValue();
@Nullable Value<?> getValue();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLSchema;
import graphql.util.TraverserContext;
import org.jspecify.annotations.NullMarked;

import java.util.Map;

@PublicApi
@NullMarked
public interface QueryVisitorFieldArgumentValueEnvironment {

GraphQLSchema getSchema();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
import graphql.schema.GraphQLOutputType;
import graphql.schema.GraphQLSchema;
import graphql.util.TraverserContext;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;

import java.util.Map;

@PublicApi
@NullMarked
public interface QueryVisitorFieldEnvironment {

/**
Expand Down Expand Up @@ -46,11 +49,11 @@ public interface QueryVisitorFieldEnvironment {
*/
GraphQLFieldsContainer getFieldsContainer();

QueryVisitorFieldEnvironment getParentEnvironment();
@Nullable QueryVisitorFieldEnvironment getParentEnvironment();

Map<String, Object> getArguments();

SelectionSetContainer getSelectionSetContainer();
@Nullable SelectionSetContainer<?> getSelectionSetContainer();

TraverserContext<Node> getTraverserContext();
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
import graphql.language.Node;
import graphql.schema.GraphQLSchema;
import graphql.util.TraverserContext;
import org.jspecify.annotations.NullMarked;

@PublicApi
@NullMarked
public interface QueryVisitorFragmentDefinitionEnvironment {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
import graphql.language.Node;
import graphql.schema.GraphQLSchema;
import graphql.util.TraverserContext;
import org.jspecify.annotations.NullMarked;

@PublicApi
@NullMarked
public interface QueryVisitorFragmentSpreadEnvironment {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
import graphql.language.Node;
import graphql.schema.GraphQLSchema;
import graphql.util.TraverserContext;
import org.jspecify.annotations.NullMarked;

@PublicApi
@NullMarked
public interface QueryVisitorInlineFragmentEnvironment {

/**
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/graphql/analysis/QueryVisitorStub.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package graphql.analysis;

import graphql.PublicApi;
import org.jspecify.annotations.NullMarked;

@PublicApi
@NullMarked
public class QueryVisitorStub implements QueryVisitor {


Expand Down
Loading