Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade GraphQL gem to ~> 2.4.3. #32

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 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