Skip to content
Snippets Groups Projects

[graphql] Convert to using the new query interpreter runtime

Merged Brett Walker requested to merge bw-graphql-interpreter into master
1 file
+ 5
2
Compare changes
  • Side-by-side
  • Inline
@@ -3,8 +3,10 @@
module GraphQLExtensions
module ScalarExtensions
# Allow ID to unify with GlobalID Types
# In particular, this effects the checks in the graphql gem,
# graphql/static_validation/rules/variable_usages_are_allowed.rb#validate_usage
def ==(other)
if name == 'ID' && other.is_a?(self.class) &&
if ['GraphQL::Types::ID', 'ID'].include?(name) && other.is_a?(self.class) &&
other.type_class.ancestors.include?(::Types::GlobalIDType)
return true
end
@@ -14,7 +16,8 @@ def ==(other)
end
end
::GraphQL::ScalarType.prepend(GraphQLExtensions::ScalarExtensions)
# ::GraphQL::ScalarType.prepend(GraphQLExtensions::ScalarExtensions)
::GraphQL::Schema::Scalar.extend(GraphQLExtensions::ScalarExtensions)
module Types
class GlobalIDType < BaseScalar
Loading