repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/introspection/input_value_type_spec.rb
spec/graphql/introspection/input_value_type_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Introspection::InputValueType do let(:query_string) {%| { __type(name: "DairyProductInput") { name description kind inputFields { name type { kind, name } defaultVal...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/introspection/entry_points_spec.rb
spec/graphql/introspection/entry_points_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Introspection::EntryPoints do describe "#__type" do let(:schema) do nested_invisible_type = Class.new(GraphQL::Schema::Object) do graphql_name 'NestedInvisible' field :foo, String, null: false end invisible_t...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/introspection/schema_type_spec.rb
spec/graphql/introspection/schema_type_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Introspection::SchemaType do let(:schema) { Class.new(Dummy::Schema) { description("Cool schema") }} let(:query_string) {%| query getSchema { __schema { description types { name } queryType { fields { name }} ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/sentry_trace_spec.rb
spec/graphql/tracing/sentry_trace_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::SentryTrace do module SentryTraceTest class Thing < GraphQL::Schema::Object field :str, String def str; "blah"; end end class Query < GraphQL::Schema::Object field :int, Integer, null: false def int ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/new_relic_tracing_spec.rb
spec/graphql/tracing/new_relic_tracing_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::NewRelicTracing do module NewRelicTest class Thing < GraphQL::Schema::Object implements GraphQL::Types::Relay::Node end class Query < GraphQL::Schema::Object include GraphQL::Types::Relay::HasNodeField fiel...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/prometheus_trace_spec.rb
spec/graphql/tracing/prometheus_trace_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::PrometheusTracing do module PrometheusTraceTest class Query < GraphQL::Schema::Object field :int, Integer, null: false def int 1 end end class Schema < GraphQL::Schema query Query end ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/detailed_trace_spec.rb
spec/graphql/tracing/detailed_trace_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::DetailedTrace do class SamplerSchema < GraphQL::Schema class Query < GraphQL::Schema::Object field :truthy, Boolean, fallback_value: true end query(Query) use GraphQL::Tracing::DetailedTrace, memory: true def se...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/legacy_trace_spec.rb
spec/graphql/tracing/legacy_trace_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::LegacyTrace do it "calls tracers on a parent schema class" do custom_tracer = Module.new do def self.trace(key, data) if key == "execute_query" data[:query].context[:tracer_ran] = true end yield...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/notifications_trace_spec.rb
spec/graphql/tracing/notifications_trace_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::NotificationsTrace do module NotificationsTraceTest class Query < GraphQL::Schema::Object field :int, Integer, null: false def int 1 end end class DummyEngine < GraphQL::Tracing::NotificationsTrace...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/scout_tracing_spec.rb
spec/graphql/tracing/scout_tracing_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::ScoutTracing do module ScoutApmTest class Query < GraphQL::Schema::Object include GraphQL::Types::Relay::HasNodeField field :int, Integer, null: false def int 1 end end class ScoutSchemaBase...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/scout_trace_spec.rb
spec/graphql/tracing/scout_trace_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::ScoutTrace do module ScoutApmTraceTest class Query < GraphQL::Schema::Object include GraphQL::Types::Relay::HasNodeField field :int, Integer, null: false def int 1 end end class ScoutSchemaB...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/notifications_tracing_spec.rb
spec/graphql/tracing/notifications_tracing_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::NotificationsTracing do module NotificationsTracingTest class Query < GraphQL::Schema::Object field :int, Integer, null: false def int 1 end end class Schema < GraphQL::Schema query Query ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/statsd_tracing_spec.rb
spec/graphql/tracing/statsd_tracing_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::StatsdTracing do module MockStatsd class << self def time(key) self.timings << key yield end attr_reader :timings def clear @timings = [] end end end class StatsdTestSch...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/statsd_trace_spec.rb
spec/graphql/tracing/statsd_trace_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::StatsdTracing do module TraceMockStatsd class << self def time(key) self.timings << key yield end def timing(key, ms) self.timings << key end attr_reader :timings def clea...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/trace_spec.rb
spec/graphql/tracing/trace_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::Trace do it "has all its methods in the development cop" do trace_source = File.read("cop/development/trace_methods_cop.rb") superable_methods = GraphQL::Tracing::Trace.instance_methods(false).sort superable_methods_source = s...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/active_support_notifications_trace_spec.rb
spec/graphql/tracing/active_support_notifications_trace_spec.rb
# frozen_string_literal: true require "spec_helper" if testing_rails? describe GraphQL::Tracing::ActiveSupportNotificationsTrace do class AsnSchema < GraphQL::Schema class ThingSource < GraphQL::Dataloader::Source def fetch(ids) ids.map { |id| { name: "Thing #{id}" } } end e...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/data_dog_tracing_spec.rb
spec/graphql/tracing/data_dog_tracing_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::DataDogTracing do module DataDogTest class Thing < GraphQL::Schema::Object field :str, String def str "blah" end end class Query < GraphQL::Schema::Object include GraphQL::Types::Relay::HasNo...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/new_relic_trace_spec.rb
spec/graphql/tracing/new_relic_trace_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::NewRelicTrace do module NewRelicTraceTest class EchoSource < GraphQL::Dataloader::Source def fetch(keys) keys end end class OtherSource < GraphQL::Dataloader::Source def fetch(keys) dataloade...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/appsignal_trace_spec.rb
spec/graphql/tracing/appsignal_trace_spec.rb
# frozen_string_literal: true require "spec_helper" module Appsignal module_function def instrument(key, &block) instrumented << key yield end def instrumented @instrumented ||= [] end def current self end def start_event # pass end def finish_event(name, title, body) ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/appoptics_tracing_spec.rb
spec/graphql/tracing/appoptics_tracing_spec.rb
# frozen_string_literal: true # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Tests for appoptics_apm tracing # # if any of these tests fail, please file an issue at # https://github.com/appoptics/appoptics-apm-ruby # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/trace_modes_spec.rb
spec/graphql/tracing/trace_modes_spec.rb
# frozen_string_literal: true require "spec_helper" describe "Trace modes for schemas" do module TraceModesTest class ParentSchema < GraphQL::Schema module GlobalTrace def execute_query(query:) query.context[:global_trace] = true super end end module Special...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/platform_trace_spec.rb
spec/graphql/tracing/platform_trace_spec.rb
# frozen_string_literal: true require "spec_helper" require_relative "./appsignal_trace_spec" require_relative "./statsd_trace_spec" describe GraphQL::Tracing::PlatformTrace do module CustomPlatformTrace include GraphQL::Tracing::PlatformTrace TRACE = [] { "lex" => "l", "parse" => "p", ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/perfetto_trace_spec.rb
spec/graphql/tracing/perfetto_trace_spec.rb
# frozen_string_literal: true require "spec_helper" require "open3" if testing_rails? describe GraphQL::Tracing::PerfettoTrace do include PerfettoSnapshot class PerfettoSchema < GraphQL::Schema class BaseObject < GraphQL::Schema::Object end class AverageReview < GraphQL::Dataloader::Sourc...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/data_dog_trace_spec.rb
spec/graphql/tracing/data_dog_trace_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::DataDogTrace do module DataDogTraceTest class Box def initialize(value) @value = value end attr_reader :value end class Thing < GraphQL::Schema::Object field :str, String def str; Box.n...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/prometheus_tracing_spec.rb
spec/graphql/tracing/prometheus_tracing_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::PrometheusTracing do module PrometheusTracingTest class Query < GraphQL::Schema::Object field :int, Integer, null: false def int 1 end end class Schema < GraphQL::Schema query Query end ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/appoptics_trace_spec.rb
spec/graphql/tracing/appoptics_trace_spec.rb
# frozen_string_literal: true # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Tests for appoptics_apm tracing # # if any of these tests fail, please file an issue at # https://github.com/appoptics/appoptics-apm-ruby # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/platform_tracing_spec.rb
spec/graphql/tracing/platform_tracing_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Tracing::PlatformTracing do class CustomPlatformTracer < GraphQL::Tracing::PlatformTracing TRACE = [] self.platform_keys = { "lex" => "l", "parse" => "p", "validate" => "v", "analyze_query" => "aq", "analyze_...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/detailed_trace/memory_backend_spec.rb
spec/graphql/tracing/detailed_trace/memory_backend_spec.rb
# frozen_string_literal: true require "spec_helper" require_relative "./backend_assertions" describe GraphQL::Tracing::DetailedTrace::MemoryBackend do include GraphQLTracingDetailedTraceBackendAssertions def new_backend(**kwargs) GraphQL::Tracing::DetailedTrace::MemoryBackend.new(**kwargs) end end
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/detailed_trace/backend_assertions.rb
spec/graphql/tracing/detailed_trace/backend_assertions.rb
# frozen_string_literal: true module GraphQLTracingDetailedTraceBackendAssertions def self.included(child_class) child_class.instance_eval do describe "BackendAssertions" do before do @backend = new_backend @backend.delete_all_traces end it "can save, retreive, ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/tracing/detailed_trace/redis_backend_spec.rb
spec/graphql/tracing/detailed_trace/redis_backend_spec.rb
# frozen_string_literal: true require "spec_helper" require_relative "./backend_assertions" if testing_redis? describe GraphQL::Tracing::DetailedTrace::RedisBackend do include GraphQLTracingDetailedTraceBackendAssertions def new_backend(**kwargs) GraphQL::Tracing::DetailedTrace::RedisBackend.new(redis:...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/validator_spec.rb
spec/graphql/static_validation/validator_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::Validator do let(:validator) { GraphQL::StaticValidation::Validator.new(schema: Dummy::Schema) } let(:query) { GraphQL::Query.new(Dummy::Schema, query_string) } let(:validate) { true } let(:errors) { validator.validate(quer...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/no_definitions_are_present_spec.rb
spec/graphql/static_validation/rules/no_definitions_are_present_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::NoDefinitionsArePresent do include StaticValidationHelpers describe "when schema definitions are present in the query" do let(:query_string) { <<-GRAPHQL { cheese(id: 1) { flavor } } type Th...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/subscription_root_exists_and_single_selection_spec.rb
spec/graphql/static_validation/rules/subscription_root_exists_and_single_selection_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::SubscriptionRootExistsAndSingleSubscriptionSelection do include StaticValidationHelpers let(:query_string) {%| subscription { test } |} let(:schema) { Class.new(GraphQL::Schema) do query_root = Cla...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/one_of_input_objects_are_valid_spec.rb
spec/graphql/static_validation/rules/one_of_input_objects_are_valid_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::OneOfInputObjectsAreValid do include StaticValidationHelpers let(:schema) { GraphQL::Schema.from_definition(%| type Query { oneOfArgField(oneOfArg: OneOfArgInput): String } input OneOfArgInput @o...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/required_input_object_attributes_are_present_spec.rb
spec/graphql/static_validation/rules/required_input_object_attributes_are_present_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::RequiredInputObjectAttributesArePresent do include StaticValidationHelpers let(:query_string) {%| query getCheese { stringCheese: cheese(id: "aasdlkfj") { ...cheeseFields } cheese(id: 1) { source @skip(if: "wha...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/required_arguments_are_present_spec.rb
spec/graphql/static_validation/rules/required_arguments_are_present_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::RequiredArgumentsArePresent do include StaticValidationHelpers let(:query_string) {" query getCheese { okCheese: cheese(id: 1) { ...cheeseFields } cheese { source } } fragment cheeseFields on Cheese { ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/fragments_are_used_spec.rb
spec/graphql/static_validation/rules/fragments_are_used_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::FragmentsAreUsed do include StaticValidationHelpers let(:query_string) {" query getCheese { name ...cheeseFields ...undefinedFields } fragment cheeseFields on Cheese { fatContent } fragment unu...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/unique_directives_per_location_spec.rb
spec/graphql/static_validation/rules/unique_directives_per_location_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::UniqueDirectivesPerLocation do include StaticValidationHelpers let(:schema) { GraphQL::Schema.from_definition(" type Query { type: Type } type Type { field: String } directive @A on FIELD ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/fields_will_merge_spec.rb
spec/graphql/static_validation/rules/fields_will_merge_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::FieldsWillMerge do include StaticValidationHelpers let(:schema) { GraphQL::Schema.from_definition(%| type Query { dog: Dog cat: Cat pet: Pet toy: Toy animal: Animal } ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/fragment_spreads_are_possible_spec.rb
spec/graphql/static_validation/rules/fragment_spreads_are_possible_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::FragmentSpreadsArePossible do include StaticValidationHelpers let(:query_string) {%| query getCheese { cheese(id: 1) { ... milkFields ... cheeseFields ... on Milk { fatContent } ... on...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/variables_are_used_and_defined_spec.rb
spec/graphql/static_validation/rules/variables_are_used_and_defined_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::VariablesAreUsedAndDefined do include StaticValidationHelpers let(:query_string) {' query getCheese( $usedVar: Int!, $usedInnerVar: [DairyAnimal!]!, $usedInlineFragmentVar: Int!, $usedFragmentVar: I...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/input_object_names_are_unique_spec.rb
spec/graphql/static_validation/rules/input_object_names_are_unique_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::InputObjectNamesAreUnique do include StaticValidationHelpers let(:query_string) {%| query getCheese { validInputObjectName: searchDairy(product: [{source: YAK}]) { __typename } duplicateInputObjectNames: search...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/fragments_are_on_composite_types_spec.rb
spec/graphql/static_validation/rules/fragments_are_on_composite_types_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::FragmentsAreOnCompositeTypes do include StaticValidationHelpers let(:query_string) {%| query getCheese { cheese(id: 1) { ... on Cheese { source ... on Boolean { something ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/directives_are_in_valid_locations_spec.rb
spec/graphql/static_validation/rules/directives_are_in_valid_locations_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::DirectivesAreInValidLocations do include StaticValidationHelpers describe "invalid directive locations" do let(:query_string) {" query getCheese @skip(if: true) { okCheese: cheese(id: 1) { id @skip(...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/argument_literals_are_compatible_spec.rb
spec/graphql/static_validation/rules/argument_literals_are_compatible_spec.rb
# frozen_string_literal: true require "spec_helper" require "uri" describe GraphQL::StaticValidation::ArgumentLiteralsAreCompatible do include StaticValidationHelpers let(:query_string) {%| query getCheese { stringCheese: cheese(id: "aasdlkfj") { ...cheeseFields } cheese(id: 1) { source @skip(if: "...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/fields_have_appropriate_selections_spec.rb
spec/graphql/static_validation/rules/fields_have_appropriate_selections_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::FieldsHaveAppropriateSelections do include StaticValidationHelpers let(:query_string) {" query getCheese { okCheese: cheese(id: 1) { fatContent, similarCheese(source: YAK) { source } } missingFieldsObject: chees...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/variable_names_are_unique_spec.rb
spec/graphql/static_validation/rules/variable_names_are_unique_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::VariableNamesAreUnique do include StaticValidationHelpers let(:query_string) { <<-GRAPHQL query GetStuff($var1: Int!, $var2: Int!, $var1: Int!, $var2: Int!, $var3: Int!) { c1: cheese(id: $var1) { flavor } c2: cheese(...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/directives_are_defined_spec.rb
spec/graphql/static_validation/rules/directives_are_defined_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::DirectivesAreDefined do include StaticValidationHelpers let(:query_string) {" query getCheese { okCheese: cheese(id: 1) { id @skip(if: true), source @nonsense(if: false) ... on Cheese { ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/variable_usages_are_allowed_spec.rb
spec/graphql/static_validation/rules/variable_usages_are_allowed_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::VariableUsagesAreAllowed do include StaticValidationHelpers let(:query_string) {' query getCheese( $goodInt: Int = 1, $okInt: Int!, $badInt: Int, $badStr: String!, $goodAnimals: [Dai...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/mutation_root_exists_spec.rb
spec/graphql/static_validation/rules/mutation_root_exists_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::MutationRootExists do include StaticValidationHelpers let(:query_string) {%| mutation addBagel { introduceShip(input: {shipName: "Bagel"}) { clientMutationId shipEdge { node { name, id } ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/argument_names_are_unique_spec.rb
spec/graphql/static_validation/rules/argument_names_are_unique_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::ArgumentNamesAreUnique do include StaticValidationHelpers describe "field arguments" do let(:query_string) { <<-GRAPHQL query GetStuff { c1: cheese(id: 1, id: 2) { flavor } c2: cheese(id: 2) { flavor } ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/arguments_are_defined_spec.rb
spec/graphql/static_validation/rules/arguments_are_defined_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::ArgumentsAreDefined do include StaticValidationHelpers let(:query_string) {" query getCheese { okCheese: cheese(id: 1) { source } cheese(silly: false, id: 2) { source } searchDairy(product: [{wacky: 1}]) ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/fields_are_defined_on_type_spec.rb
spec/graphql/static_validation/rules/fields_are_defined_on_type_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::FieldsAreDefinedOnType do include StaticValidationHelpers let(:query_string) { " query getCheese { notDefinedField { name } cheese(id: 1) { nonsenseField, flavor ...cheeseFields } fromSource(source: COW) {...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/fragments_are_named_spec.rb
spec/graphql/static_validation/rules/fragments_are_named_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::FragmentTypesExist do include StaticValidationHelpers let(:query_string) {" fragment on Cheese { id flavor } "} it "finds non-existent types on fragments" do assert_equal(1, errors.length) frag...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/variables_are_input_types_spec.rb
spec/graphql/static_validation/rules/variables_are_input_types_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::VariablesAreInputTypes do include StaticValidationHelpers let(:query_string) {' query getCheese( $id: Int = 1, $str: [String!], $interface: AnimalProduct!, $object: Milk = 1, $...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/operation_names_are_valid_spec.rb
spec/graphql/static_validation/rules/operation_names_are_valid_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::OperationNamesAreValid do include StaticValidationHelpers describe "when there are multiple operations" do let(:query_string) { <<-GRAPHQL query getCheese { cheese(id: 1) { flavor } } { cheese(id: ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/fragments_are_finite_spec.rb
spec/graphql/static_validation/rules/fragments_are_finite_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::FragmentsAreFinite do include StaticValidationHelpers let(:query_string) {%| query getCheese { cheese(id: 1) { ... idField ... sourceField similarCheese(source: SHEEP) { ... flavorFi...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/variable_default_values_are_correctly_typed_spec.rb
spec/graphql/static_validation/rules/variable_default_values_are_correctly_typed_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::VariableDefaultValuesAreCorrectlyTyped do include StaticValidationHelpers let(:query_string) {%| query getCheese( $id: Int = 1, $str: String!, $badInt: Int = "abc", $input: Dairy...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/fragment_types_exist_spec.rb
spec/graphql/static_validation/rules/fragment_types_exist_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::FragmentTypesExist do include StaticValidationHelpers let(:query_string) {" query getCheese { cheese(id: 1) { ... on Cheese { source } ... on Nothing { whatever } ... somethingFields ....
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/static_validation/rules/fragment_names_are_unique_spec.rb
spec/graphql/static_validation/rules/fragment_names_are_unique_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::FragmentNamesAreUnique do include StaticValidationHelpers let(:query_string) {" query { cheese(id: 1) { ... frag1 } } fragment frag1 on Cheese { id } fragment frag1 on Cheese { id } "} ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/execution/lookahead_spec.rb
spec/graphql/execution/lookahead_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Execution::Lookahead do module LookaheadTest DATA = [ OpenStruct.new(name: "Cardinal", is_waterfowl: false, similar_species_names: ["Scarlet Tanager"], genus: OpenStruct.new(latin_name: "Piranga")), OpenStruct.new(name: "Scarlet Ta...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/execution/breadth_runtime_spec.rb
spec/graphql/execution/breadth_runtime_spec.rb
# frozen_string_literal: true require "spec_helper" describe "GraphQL::Execution::Interpreter for breadth-first execution" do # A breadth-first interpreter uses the following runtime interface: # - evaluate_selection(result_key, ast_nodes, selections_result) # - exit_with_inner_result? class SimpleBreadthRunti...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/execution/multiplex_spec.rb
spec/graphql/execution/multiplex_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Execution::Multiplex do def multiplex(*a, **kw) LazyHelpers::LazySchema.multiplex(*a, **kw) end let(:q1) { <<-GRAPHQL query Q1 { nestedSum(value: 3) { value nestedSum(value: 7) { value } }...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/execution/instrumentation_spec.rb
spec/graphql/execution/instrumentation_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Schema do describe "instrumentation teardown bug" do # This instrumenter records that it ran, # or raises an error if instructed to do so class InstrumenterError < StandardError attr_reader :key def initialize(key) ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/execution/interpreter_spec.rb
spec/graphql/execution/interpreter_spec.rb
# frozen_string_literal: true require "spec_helper" require_relative "../subscriptions_spec" describe GraphQL::Execution::Interpreter do module InterpreterTest class Box def initialize(value: nil, &block) @value = value @block = block end def value if @block @...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/execution/errors_spec.rb
spec/graphql/execution/errors_spec.rb
# frozen_string_literal: true require "spec_helper" describe "GraphQL::Execution::Errors" do class ParentErrorsTestSchema < GraphQL::Schema class ErrorD < RuntimeError; end rescue_from(ErrorD) do |err, obj, args, ctx, field| raise GraphQL::ExecutionError, "ErrorD on #{obj.inspect} at #{field ? "#{fiel...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/execution/lazy_spec.rb
spec/graphql/execution/lazy_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Execution::Lazy do include LazyHelpers describe "resolving" do it "calls value handlers" do res = run_query('{ int(value: 2, plus: 1) }') assert_equal 3, res["data"]["int"] end it "Works with Query.new" do query_...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/execution/lazy/lazy_method_map_spec.rb
spec/graphql/execution/lazy/lazy_method_map_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Execution::Lazy::LazyMethodMap do def self.test_lazy_method_map it "handles multithreaded access" do a = Class.new b = Class.new(a) c = Class.new(b) lazy_method_map.set(a, :a) threads = 1000.times.map do |i| ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/execution/interpreter/arguments_spec.rb
spec/graphql/execution/interpreter/arguments_spec.rb
# frozen_string_literal: true require "spec_helper" describe "GraphQL::Execution::Interpreter::Arguments" do class InterpreterArgsTestSchema < GraphQL::Schema class SearchParams < GraphQL::Schema::InputObject argument :query, String, required: false end class Query < GraphQL::Schema::Object ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/analysis/max_query_complexity_spec.rb
spec/graphql/analysis/max_query_complexity_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Analysis::MaxQueryComplexity do let(:schema) { Class.new(Dummy::Schema) } let(:query_string) {%| { a: cheese(id: 1) { id } b: cheese(id: 1) { id } c: cheese(id: 1) { id } d: cheese(id: 1) { id } e: cheese(id: 1)...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/analysis/query_complexity_spec.rb
spec/graphql/analysis/query_complexity_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Analysis::QueryComplexity do let(:schema) { Class.new(Dummy::Schema) { complexity_cost_calculation_mode(:future) } } let(:reduce_result) { GraphQL::Analysis.analyze_query(query, [GraphQL::Analysis::QueryComplexity]) } let(:reduce_multiplex_res...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/analysis/max_query_depth_spec.rb
spec/graphql/analysis/max_query_depth_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Analysis::MaxQueryDepth do let(:schema) { schema = Class.new(Dummy::Schema) schema.analysis_engine = GraphQL::Analysis::AST schema } let(:query_string) { " { cheese(id: 1) { similarCheese(source: SHEEP) { ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/analysis/field_usage_spec.rb
spec/graphql/analysis/field_usage_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Analysis::FieldUsage do let(:result) { GraphQL::Analysis.analyze_query(query, [GraphQL::Analysis::FieldUsage]).first } let(:query) { GraphQL::Query.new(Dummy::Schema, query_string, variables: variables) } let(:variables) { {} } describe "qu...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/analysis/query_depth_spec.rb
spec/graphql/analysis/query_depth_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Analysis::QueryDepth do let(:result) { GraphQL::Analysis.analyze_query(query, [GraphQL::Analysis::QueryDepth]) } let(:query) { GraphQL::Query.new(Dummy::Schema, query_string, variables: variables) } let(:variables) { {} } describe "multiple...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/types/id_spec.rb
spec/graphql/types/id_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Types::ID do let(:result) { Dummy::Schema.execute(query_string)} describe "coercion for int inputs" do let(:query_string) { %|query getMilk { cow: milk(id: 1) { id } }| } it "coerces IDs from ints and serializes as strings" do ex...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/types/big_int_spec.rb
spec/graphql/types/big_int_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Types::BigInt do it "encodes big and small integers as strings" do big_integer_1 = 99**99 expected_str_1 = "36972963764972677265718790562880544059566876428174110243025997242355257045527752342141065001012823272794097888954832654011942999676...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/types/string_spec.rb
spec/graphql/types/string_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Types::String do let(:string_type) { GraphQL::Types::String } it "is a default scalar" do assert_equal(true, string_type.default_scalar?) end describe "coerce_result" do let(:utf_8_str) { "foobar" } let(:ascii_str) { "foobar".e...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/types/int_spec.rb
spec/graphql/types/int_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Types::Int do describe "coerce_input" do it "accepts ints within the bounds" do assert_equal(-(2**31), GraphQL::Types::Int.coerce_isolated_input(-(2**31))) assert_equal 1, GraphQL::Types::Int.coerce_isolated_input(1) assert_e...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/types/float_spec.rb
spec/graphql/types/float_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Types::Float do let(:enum) { GraphQL::Language::Nodes::Enum.new(name: 'MILK') } describe "coerce_input" do it "accepts ints and floats" do assert_equal 1.0, GraphQL::Types::Float.coerce_isolated_input(1) assert_equal 6.1, GraphQ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/types/iso_8601_date_spec.rb
spec/graphql/types/iso_8601_date_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Types::ISO8601Date do module DateTest class DateObject < GraphQL::Schema::Object field :year, Integer, null: false field :month, Integer, null: false field :day, Integer, null: false field :iso8601, GraphQL::Types::ISO8...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/types/boolean_spec.rb
spec/graphql/types/boolean_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Types::Boolean do describe "coerce_input" do def coerce_input(input) GraphQL::Types::Boolean.coerce_isolated_input(input) end it "accepts true and false" do assert_equal true, coerce_input(true) assert_equal false, c...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/types/iso_8601_date_time_spec.rb
spec/graphql/types/iso_8601_date_time_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Types::ISO8601DateTime do module DateTimeTest class DateTimeObject < GraphQL::Schema::Object field :year, Integer, null: false field :month, Integer, null: false field :day, Integer, null: false field :hour, Integer, nu...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/types/relay/has_node_field_spec.rb
spec/graphql/types/relay/has_node_field_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Types::Relay::HasNodeField do it "populates .owner when it's included" do query = Class.new(GraphQL::Schema::Object) do graphql_name "Query" include GraphQL::Types::Relay::HasNodeField include GraphQL::Types::Relay::HasNodesF...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/types/relay/base_connection_spec.rb
spec/graphql/types/relay/base_connection_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Types::Relay::BaseConnection do module NonNullAbleNodeDummy class Node < GraphQL::Schema::Object field :some_field, String end class NodeEdgeType < GraphQL::Types::Relay::BaseEdge node_type(Node, null: false) end ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/types/relay/node_behaviors_spec.rb
spec/graphql/types/relay/node_behaviors_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Types::Relay::NodeBehaviors do class NodeBehaviorsSchema < GraphQL::Schema class Thing < GraphQL::Schema::Object implements GraphQL::Types::Relay::Node end class Query < GraphQL::Schema::Object field :thing, Thing d...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/types/relay/base_edge_spec.rb
spec/graphql/types/relay/base_edge_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Types::Relay::BaseEdge do module NonNullableDummy class NonNullableNode < GraphQL::Schema::Object field :some_field, String end class NonNullableNodeEdgeType < GraphQL::Types::Relay::BaseEdge node_type(NonNullableNode, nul...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/pagination/connections_spec.rb
spec/graphql/pagination/connections_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Pagination::Connections do ITEMS = ConnectionAssertions::NAMES.map { |n| { name: n } } class ArrayConnectionWithTotalCount < GraphQL::Pagination::ArrayConnection def total_count items.size end end let(:base_schema) { Conn...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/pagination/array_connection_spec.rb
spec/graphql/pagination/array_connection_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Pagination::ArrayConnection do ARRAY_ITEMS = ConnectionAssertions::NAMES.map { |n| { name: n } } class ArrayTestConnectionWithTotalCount < GraphQL::Pagination::ArrayConnection def total_count items.size end end let(:schema) {...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/pagination/connection_spec.rb
spec/graphql/pagination/connection_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Pagination::Connection do describe "was_authorized_by_scope_ites?" do it "doesn't raise an error for missing runtime state and it updates it if context is assigned later" do context = GraphQL::Query.new(GraphQL::Schema, "{ __typename }")...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/pagination/mongoid_relation_connection_spec.rb
spec/graphql/pagination/mongoid_relation_connection_spec.rb
# frozen_string_literal: true require "spec_helper" if testing_mongoid? describe GraphQL::Pagination::MongoidRelationConnection do class Food include Mongoid::Document field :name, type: String end before do # Populate the DB Food.collection.drop ConnectionAssertions::NAMES...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/pagination/sequel_dataset_connection_spec.rb
spec/graphql/pagination/sequel_dataset_connection_spec.rb
# frozen_string_literal: true require "spec_helper" if testing_rails? describe GraphQL::Pagination::SequelDatasetConnection do class SequelFood < Sequel::Model(:foods) end before do if SequelFood.empty? # Can overlap with ActiveRecordRelationConnection test ConnectionAssertions::NAMES.each...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/pagination/active_record_relation_connection_spec.rb
spec/graphql/pagination/active_record_relation_connection_spec.rb
# frozen_string_literal: true require "spec_helper" if testing_rails? describe GraphQL::Pagination::ActiveRecordRelationConnection do class RelationConnectionWithTotalCount < GraphQL::Pagination::ActiveRecordRelationConnection def total_count if items.respond_to?(:unscope) items.unscope(:...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/testing/helpers_spec.rb
spec/graphql/testing/helpers_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Testing::Helpers do class AssertionsSchema < GraphQL::Schema use GraphQL::Schema::Warden if ADD_WARDEN class BillSource < GraphQL::Dataloader::Source def fetch(students) students.map { |s| { amount: 1_000_001 } } end ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/cop/field_type_in_block_spec.rb
spec/graphql/cop/field_type_in_block_spec.rb
# frozen_string_literal: true require 'spec_helper' describe "GraphQL::Cop::FieldTypeInBlock" do include RubocopTestHelpers it "finds and autocorrects field corrections with inline types" do result = run_rubocop_on("spec/fixtures/cop/field_type.rb") assert_equal 3, rubocop_errors(result) assert_inclu...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/cop/default_null_true_spec.rb
spec/graphql/cop/default_null_true_spec.rb
# frozen_string_literal: true require 'spec_helper' describe "GraphQL::Cop::DefaultNullTrue" do include RubocopTestHelpers it "finds and autocorrects `null: true` field configurations" do result = run_rubocop_on("spec/fixtures/cop/null_true.rb") assert_equal 3, rubocop_errors(result) assert_includes ...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/cop/default_required_true_spec.rb
spec/graphql/cop/default_required_true_spec.rb
# frozen_string_literal: true require 'spec_helper' describe "GraphQL::Cop::DefaultRequiredTrue" do include RubocopTestHelpers it "finds and autocorrects `required: true` argument configurations" do result = run_rubocop_on("spec/fixtures/cop/required_true.rb") assert_equal 4, rubocop_errors(result) a...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/cop/root_types_in_block_spec.rb
spec/graphql/cop/root_types_in_block_spec.rb
# frozen_string_literal: true require 'spec_helper' describe "GraphQL::Cop::RootTypesInBlock" do include RubocopTestHelpers it "finds and autocorrects field corrections with inline types" do result = run_rubocop_on("spec/fixtures/cop/root_types.rb") assert_equal 3, rubocop_errors(result) assert_inclu...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/language/definition_slice_spec.rb
spec/graphql/language/definition_slice_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Language::DefinitionSlice do let(:document) { GraphQL.parse(query_string) } describe "anonymous query with no dependencies" do let(:query_string) {%| { version } |} it "is already the smallest slice" do as...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/language/visitor_spec.rb
spec/graphql/language/visitor_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Language::Visitor do let(:document) { GraphQL.parse(" query cheese { cheese(id: 1) { flavor, source, producers(first: 3) { name } ... cheeseFields } } fragment cheeseFields...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false
rmosolgo/graphql-ruby
https://github.com/rmosolgo/graphql-ruby/blob/fa2ba4e489f8475b194f7c6985e0b25681a442c2/spec/graphql/language/block_string_spec.rb
spec/graphql/language/block_string_spec.rb
# frozen_string_literal: true require "spec_helper" describe GraphQL::Language::BlockString do describe "trimming whitespace" do def trim_whitespace(str) GraphQL::Language::BlockString.trim_whitespace(str) end it "matches the examples in graphql-js" do # these are taken from: # https:/...
ruby
MIT
fa2ba4e489f8475b194f7c6985e0b25681a442c2
2026-01-04T15:43:02.089024Z
false