Skip to content

Commit

Permalink
feat(apollo-ios-codegen): Stable sort schema types for SchemaMetadata (
Browse files Browse the repository at this point in the history
  • Loading branch information
asmundg authored and gh-action-runner committed Oct 21, 2024
1 parent 5745bd6 commit 378929b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/IR/IR+Schema.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public final class Schema {
_ types: [GraphQLNamedType],
schemaRootTypes: CompilationResult.RootTypeDefinition
) {
self.allTypes = OrderedSet(types)
// Ensure allTypes is stable
self.allTypes = OrderedSet(types.sorted(by: { $0.name.schemaName < $1.name.schemaName }))
self.schemaRootTypes = schemaRootTypes

var objects = OrderedSet<GraphQLObjectType>()
Expand Down

0 comments on commit 378929b

Please sign in to comment.