Skip to content

Commit

Permalink
Upgrade GraphQL gem to ~> 2.4.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
myronmarston committed Nov 12, 2024
1 parent 571c2fd commit 97c9ca0
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion elasticgraph-apollo/elasticgraph-apollo.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ElasticGraphGemspecHelper.define_elasticgraph_gem(gemspec_file: __FILE__, catego

spec.add_dependency "elasticgraph-graphql", eg_version
spec.add_dependency "elasticgraph-support", eg_version
spec.add_dependency "graphql", "~> 2.3.19"
spec.add_dependency "graphql", "~> 2.4.3"
spec.add_dependency "apollo-federation", "~> 3.8"

# Note: technically, this is not purely a development dependency, but since `eg-schema_def`
Expand Down
2 changes: 1 addition & 1 deletion elasticgraph-graphql/elasticgraph-graphql.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ElasticGraphGemspecHelper.define_elasticgraph_gem(gemspec_file: __FILE__, catego

spec.add_dependency "elasticgraph-datastore_core", eg_version
spec.add_dependency "elasticgraph-schema_artifacts", eg_version
spec.add_dependency "graphql", "~> 2.3.19"
spec.add_dependency "graphql", "~> 2.4.3"

spec.add_development_dependency "elasticgraph-admin", eg_version
spec.add_development_dependency "elasticgraph-elasticsearch", eg_version
Expand Down
8 changes: 7 additions & 1 deletion elasticgraph-graphql/lib/elastic_graph/graphql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,13 @@ def datastore_query_builder
def graphql_gem_plugins
@graphql_gem_plugins ||= begin
require "graphql"
{::GraphQL::Dataloader => {}}
{
# We depend on this to avoid N+1 calls to the datastore.
::GraphQL::Dataloader => {},
# This is new in the graphql-ruby 2.4 release, and will be required in the future.
# We pass `preload: true` because the way we handle the schema depends on it being preloaded.
::GraphQL::Schema::Visibility => {preload: true}
}
end
end

Expand Down
3 changes: 3 additions & 0 deletions elasticgraph-graphql/sig/graphql_gem.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ module GraphQL
class Printer
def self.print_schema: (Schema, **untyped) -> ::String
end

class Visibility
end
end

module StaticValidation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ElasticGraphGemspecHelper.define_elasticgraph_gem(gemspec_file: __FILE__, catego

spec.add_dependency "elasticgraph-graphql", eg_version
spec.add_dependency "elasticgraph-support", eg_version
spec.add_dependency "graphql", "~> 2.3.19"
spec.add_dependency "graphql", "~> 2.4.3"
spec.add_dependency "rake", "~> 13.2"

spec.add_development_dependency "elasticgraph-elasticsearch", eg_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ module QueryRegistry
For client `client_bob`:
- CountComponents.graphql (2 operations):
- CountComponents: 🛑. Got 2 validation errors:
1) Field 'total_edge_count2' doesn't exist on type 'ComponentConnection'
1) Field 'total_edge_count2' doesn't exist on type 'ComponentConnection' (Did you mean `total_edge_count`?)
path: query CountComponents.components.total_edge_count2
source: query_registry/client_bob/CountComponents.graphql:3:5
code: undefinedField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ElasticGraphGemspecHelper.define_elasticgraph_gem(gemspec_file: __FILE__, catego
spec.add_dependency "elasticgraph-json_schema", eg_version
spec.add_dependency "elasticgraph-schema_artifacts", eg_version
spec.add_dependency "elasticgraph-support", eg_version
spec.add_dependency "graphql", "~> 2.3.19"
spec.add_dependency "graphql", "~> 2.4.3"
spec.add_dependency "rake", "~> 13.2"

spec.add_development_dependency "elasticgraph-admin", eg_version
Expand Down

0 comments on commit 97c9ca0

Please sign in to comment.