source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | wilkerlucio/mongoid_taggable | https://github.com/wilkerlucio/mongoid_taggable | mongoid_taggable.gemspec | Ruby | apache-2.0 | 190 | master | 868 | # -*- encoding: utf-8 -*-
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
Gem::Specification.new do |g|
g.name = 'mongoid_taggable'
g.version = '1.1.1'
g.date = '2013-03-22'
g.description = %q{Mongoid Taggable provides some helpers to create ... |
github | wilkerlucio/mongoid_taggable | https://github.com/wilkerlucio/mongoid_taggable | Rakefile | Ruby | apache-2.0 | 190 | master | 687 | require 'bundler'
require 'bundler/gem_tasks'
begin
Bundler.setup(:default, :test)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
require 'rake'
require 'rdoc/task'
require 'rspec'
require 'rspec/core/rake_task'
desc ... |
github | wilkerlucio/mongoid_taggable | https://github.com/wilkerlucio/mongoid_taggable | spec/spec_helper.rb | Ruby | apache-2.0 | 190 | master | 330 | $: << File.expand_path("../../lib", __FILE__)
require 'database_cleaner'
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.strategy = :truncation
end
config.after(:each) do
DatabaseCleaner.clean
end
end
require 'mongoid'
require 'mongoid_taggable'
Mongoid.load!("spec/mongoid.yml"... |
github | wilkerlucio/mongoid_taggable | https://github.com/wilkerlucio/mongoid_taggable | spec/mongoid/taggable_spec.rb | Ruby | apache-2.0 | 190 | master | 6,022 | # Copyright (c) 2010 Wilker Lúcio <wilkerlucio@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
github | wilkerlucio/mongoid_taggable | https://github.com/wilkerlucio/mongoid_taggable | lib/mongoid/taggable.rb | Ruby | apache-2.0 | 190 | master | 3,183 | # Copyright (c) 2010 Wilker Lúcio <wilkerlucio@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | simple_xlsx_reader.gemspec | Ruby | mit | 190 | master | 944 | # -*- encoding: utf-8 -*-
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'simple_xlsx_reader/version'
Gem::Specification.new do |gem|
gem.name = "simple_xlsx_reader"
gem.version = SimpleXlsxReader::VERSION
gem.authors = ["Woody Pete... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | lib/simple_xlsx_reader.rb | Ruby | mit | 190 | master | 1,415 | # frozen_string_literal: true
require 'nokogiri'
require 'date'
require 'simple_xlsx_reader/version'
require 'simple_xlsx_reader/hyperlink'
require 'simple_xlsx_reader/document'
require 'simple_xlsx_reader/loader'
require 'simple_xlsx_reader/loader/workbook_parser'
require 'simple_xlsx_reader/loader/shared_strings_pa... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | lib/simple_xlsx_reader/loader.rb | Ruby | mit | 190 | master | 5,994 | # frozen_string_literal: true
module SimpleXlsxReader
class Loader < Struct.new(:string_or_io)
attr_accessor :shared_strings, :sheet_parsers, :sheet_toc, :style_types, :base_date
def init_sheets
ZipReader.new(
string_or_io: string_or_io,
loader: self
).read
sheet_toc.each_... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | lib/simple_xlsx_reader/document.rb | Ruby | mit | 190 | master | 4,577 | # frozen_string_literal: true
require 'forwardable'
module SimpleXlsxReader
##
# Main class for the public API. See the README for usage examples,
# or read the code, it's pretty friendly.
class Document
attr_reader :string_or_io
def initialize(legacy_file_path = nil, file_path: nil, string_or_io: n... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | lib/simple_xlsx_reader/hyperlink.rb | Ruby | mit | 190 | master | 1,190 | # frozen_string_literal: true
module SimpleXlsxReader
# We support hyperlinks as a "type" even though they're technically
# represented either as a function or an external reference in the xlsx spec.
#
# In practice, hyperlinks are usually a link or a mailto. In the case of a
# link, we probably want to foll... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | lib/simple_xlsx_reader/loader/style_types_parser.rb | Ruby | mit | 190 | master | 4,588 | # frozen_string_literal: true
module SimpleXlsxReader
class Loader
StyleTypesParser = Struct.new(:file_io) do
def self.parse(file_io)
new(file_io).tap(&:parse).style_types
end
# Map of non-custom numFmtId to casting symbol
NumFmtMap = {
0 => :string, # General
... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | lib/simple_xlsx_reader/loader/shared_strings_parser.rb | Ruby | mit | 190 | master | 1,148 | # frozen_string_literal: true
module SimpleXlsxReader
class Loader
# For performance reasons, excel uses an optional SpreadsheetML feature
# that puts all strings in a separate xml file, and then references
# them by their index in that file.
#
# http://msdn.microsoft.com/en-us/library/office/gg2... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | lib/simple_xlsx_reader/loader/workbook_parser.rb | Ruby | mit | 190 | master | 1,213 | # frozen_string_literal: true
module SimpleXlsxReader
class Loader
WorkbookParser = Struct.new(:file_io) do
def self.parse(file_io)
parser = new(file_io).tap(&:parse)
[parser.sheet_toc, parser.base_date]
end
def parse
@xml = Nokogiri::XML(file_io.read).remove_namespaces... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | lib/simple_xlsx_reader/loader/sheet_parser.rb | Ruby | mit | 190 | master | 9,303 | # frozen_string_literal: true
require 'forwardable'
module SimpleXlsxReader
class Loader
class SheetParser < Nokogiri::XML::SAX::Document
extend Forwardable
attr_accessor :xrels_file
attr_accessor :hyperlinks_by_cell
attr_reader :load_errors
def_delegators :@loader, :style_types... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | test/date1904_test.rb | Ruby | mit | 190 | master | 398 | # frozen_string_literal: true
require_relative 'test_helper'
describe SimpleXlsxReader do
let(:date1904_file) { File.join(File.dirname(__FILE__), 'date1904.xlsx') }
let(:subject) { SimpleXlsxReader::Document.new(date1904_file) }
it 'supports converting dates with the 1904 date system' do
_(subject.to_hash)... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | test/lower_case_sharedstrings_test.rb | Ruby | mit | 190 | master | 466 | # frozen_string_literal: true
require_relative 'test_helper'
describe SimpleXlsxReader do
let(:lower_case_shared_strings) do
File.join(
File.dirname(__FILE__),
'lower_case_sharedstrings.xlsx'
)
end
let(:subject) { SimpleXlsxReader::Document.new(lower_case_shared_strings) }
describe '#to_... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | test/gdocs_sheet_test.rb | Ruby | mit | 190 | master | 439 | # frozen_string_literal: true
require_relative 'test_helper'
require 'time'
describe SimpleXlsxReader do
let(:one_sheet_file) { File.join(File.dirname(__FILE__), 'gdocs_sheet.xlsx') }
let(:subject) { SimpleXlsxReader::Document.new(one_sheet_file) }
it 'able to load file from google docs' do
_(subject.to_ha... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | test/performance_test.rb | Ruby | mit | 190 | master | 2,712 | # frozen_string_literal: true
require_relative 'test_helper'
require 'minitest/benchmark'
describe 'SimpleXlsxReader Benchmark' do
# n is 0-indexed for us, then converted to 1-indexed for excel
def sheet_with_n_rows(row_count)
acc = +""
acc <<
<<~XML
<worksheet xmlns="http://schemas.openxmlf... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | test/test_helper.rb | Ruby | mit | 190 | master | 227 | # frozen_string_literal: true
gem 'minitest'
require 'minitest/autorun'
require 'minitest/spec'
require 'pry'
require 'time'
require 'test_xlsx_builder'
$LOAD_PATH.unshift File.expand_path('lib')
require 'simple_xlsx_reader' |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | test/namespaces_and_missing_atts_test.rb | Ruby | mit | 190 | master | 2,604 | # frozen_string_literal: true
require_relative 'test_helper'
describe SimpleXlsxReader do
# Based on a real-world sheet possibly generated by PowerBI, where the xml
# has namespacing and rows are missing the 'r' attribute.
let(:sheet) do
<<~XML
<?xml version="1.0" encoding="utf-8"?>
<x:worksheet... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | test/test_xlsx_builder.rb | Ruby | mit | 190 | master | 2,489 | # frozen_string_literal: true
require 'nokogiri'
TestXlsxBuilder = Struct.new(:shared_strings, :styles, :sheets, :workbook, :rels, keyword_init: true) do
DEFAULTS = {
workbook:
Nokogiri::XML(
<<-XML
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | test/datetime_test.rb | Ruby | mit | 190 | master | 619 | # frozen_string_literal: true
require_relative 'test_helper'
describe SimpleXlsxReader do
let(:datetimes_file) do
File.join(
File.dirname(__FILE__),
'datetimes.xlsx'
)
end
let(:subject) { SimpleXlsxReader::Document.new(datetimes_file) }
it 'converts date_times with the correct precision'... |
github | woahdae/simple_xlsx_reader | https://github.com/woahdae/simple_xlsx_reader | test/simple_xlsx_reader_test.rb | Ruby | mit | 190 | master | 32,359 | # frozen_string_literal: true
require_relative 'test_helper'
require 'time'
SXR = SimpleXlsxReader
describe SimpleXlsxReader do
let(:sesame_street_blog_file) do
File.join(File.dirname(__FILE__), 'sesame_street_blog.xlsx')
end
let(:document) { SimpleXlsxReader.open(sesame_street_blog_file) }
##
# A hi... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | Rakefile | Ruby | mit | 190 | master | 697 | # frozen_string_literal: true
# Rake tasks for development purposes
begin
require 'bundler/setup' unless ENV.key?('CI_COMPILE')
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
require 'rdoc/task'
require 'rake/testtask'
require_relative 'tasks/libgraphqlparser'
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | rails-graphql.gemspec | Ruby | mit | 190 | master | 1,924 | # frozen_string_literal: true
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
# Maintain your gem's version:
require 'rails/graphql/version'
require 'date'
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = 'rails-graphql'
s.version = Rails::GraphQL.version
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | Gemfile | Ruby | mit | 190 | master | 239 | # frozen_string_literal: true
source 'https://rubygems.org'
gemspec
gem 'rails', '~> 7.1'
gem 'bootsnap' # required by the Rails apps generated in tests
gem 'ruby-prof', platform: :ruby
gem 'pry-byebug'
gem 'flamegraph'
gem 'stackprof' |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | examples/definitions.rb | Ruby | mit | 190 | master | 1,944 | class GraphQL::Point2dInput < GraphQL::Input
desc 'A geometry point with +x+ and +y+ values'
field :x, :integer, null: false, desc: 'The +x+ value'
field :y, :integer, null: false, desc: 'The +y+ value'
end
class GraphQL::NamedInterface < GraphQL::Interface
desc 'Any entity that has first and last name'
fi... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | examples/schema_introspection.rb | Ruby | mit | 190 | master | 663 | # This reproduces the same result as
# http://spec.graphql.org/June2018/#sec-Schema-Introspection
[
GraphQL::Object::SchemaObject,
GraphQL::Object::TypeObject,
GraphQL::Object::FieldObject,
GraphQL::Object::InputValueObject,
GraphQL::Object::EnumValueObject,
GraphQL::Enum::TypeKindEnum,
GraphQL::Object::... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | examples/memory_star_wars.rb | Ruby | mit | 190 | master | 4,621 | EPISODES = %w[new_hope empire jedi]
class Character
attr_accessor :id, :name, :friends, :appears_in
def initialize(**data)
data.each { |k, v| send("#{k}=", v) }
end
def friends
@friends.map do |id|
STAR_WARS_DATA[:humans][id] || STAR_WARS_DATA[:droids][id]
end
end
def appears_in
@a... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/test_ext.rb | Ruby | mit | 190 | master | 1,536 | # Core ext methods
class Object < BasicObject
def new_token(value, type)
GQLParser::Token.new(value).tap do |token|
token.instance_variable_set(:@type, type)
end
end
def stub_ivar(name, value = nil)
instance_variable_set(name, value)
yield
ensure
remove_instance_variable(name)
end
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql_test.rb | Ruby | mit | 190 | master | 1,571 | require 'config'
class GraphQLTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL
def test_type_map
DESCRIBED_CLASS.stub_cvar(:@@type_map, 1) do
assert_equal(1, DESCRIBED_CLASS.type_map)
end
assert_instance_of(Rails::GraphQL::TypeMap, DESCRIBED_CLASS.type_map)
end
def test_ar_adapter... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/config.rb | Ruby | mit | 190 | master | 2,506 | require 'simplecov'
SimpleCov.start do
coverage_criterion :branch
add_filter '/test/'
add_group 'Definition', ['/graphql/type', '/graphql/directive']
add_group 'Field', ['/graphql/alternative', '/graphql/field']
add_group 'Helpers', '/graphql/helpers'
add_group 'Rails', '/graphql/railties'
add_group 'Re... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/authorization_test.rb | Ruby | mit | 190 | master | 4,284 | require 'integration/config'
class Integration_AuthorizationTest < GraphQL::IntegrationTestCase
class SCHEMA < GraphQL::Schema
namespace :authorization
configure do |config|
config.enable_string_collector = false
config.default_response_format = :json
end
query_fields do
field(:sa... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/config.rb | Ruby | mit | 190 | master | 2,212 | require 'config'
require 'active_support/core_ext/class/subclasses'
module GraphQL
class IntegrationTestCase < TestCase
SCHEMAS = Pathname.new(__dir__).join('schemas')
ASSETS = Pathname.new(__dir__).join('../assets')
I18n.load_path << ASSETS.join("en.yml")
BASE_SCHEMA = ::Rails::GraphQL::Schema
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/alternative_test.rb | Ruby | mit | 190 | master | 3,820 | require 'integration/config'
class Integration_AlternativeTest < GraphQL::IntegrationTestCase
module Alternatives
# A regular field that is imported into an object
class SampleField < GraphQL::Field
define_field :sample, :string
def resolve
"#{current[:sample]} Resolved"
end
en... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/translate_test.rb | Ruby | mit | 190 | master | 2,310 | require 'integration/config'
class Translate_test < GraphQL::IntegrationTestCase
class SCHEMA < GraphQL::Schema
namespace :translate
configure do |config|
config.enable_string_collector = false
config.default_response_format = :json
end
query_fields do
field :sample_field, :string... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/customization_test.rb | Ruby | mit | 190 | master | 1,175 | require 'integration/config'
class Integration_CustomizationTest < GraphQL::IntegrationTestCase
class SCHEMA < GraphQL::Schema
namespace :customization
configure do |config|
config.schema_type_names = {
query: 'A',
mutation: 'B',
subscription: 'C',
}
end
query_fi... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/resolver_precedence_test.rb | Ruby | mit | 190 | master | 4,692 | require 'integration/config'
class Integration_ResolverPrecedenceTest < GraphQL::IntegrationTestCase
EVENT_HANDLERS = { resolve: :@resolver, perform: :@performer }
class SCHEMA < GraphQL::Schema
namespace :precedence
configure do |config|
config.enable_string_collector = false
config.default_... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/global_id_test.rb | Ruby | mit | 190 | master | 2,824 | require 'integration/config'
class Integration_GlobalIDTest < GraphQL::IntegrationTestCase
load_schema 'memory'
SCHEMA = ::StartWarsMemSchema
## CREATE
def test_create_directive
obj = GraphQL::Directive::DeprecatedDirective
assert_gid_value('gql://base/Directive/deprecated', obj)
end
def test_c... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/persisted_query_test.rb | Ruby | mit | 190 | master | 2,228 | require 'integration/config'
class Integration_PersistedQueryTest < GraphQL::IntegrationTestCase
class SCHEMA < GraphQL::Schema
namespace :cached
configure do |config|
config.enable_string_collector = false
config.default_response_format = :json
end
query_fields do
field(:one, :st... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/sqlite/star_wars_mutation_test.rb | Ruby | mit | 190 | master | 2,561 | require 'integration/config'
class Integration_SQLite_StarWarsMutationTest < GraphQL::IntegrationTestCase
load_schema 'sqlite'
SCHEMA = ::StartWarsSqliteSchema
def test_can_create_faction
args = { data: { name: 'Aliens' } }
record = { id: next_id, name: 'Aliens' }
assert_result({ data: { record: re... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/sqlite/star_wars_introspection_test.rb | Ruby | mit | 190 | master | 787 | require 'integration/config'
class Integration_SQLite_StarWarsIntrospectionTest < GraphQL::IntegrationTestCase
load_schema 'sqlite'
SCHEMA = ::StartWarsSqliteSchema
def test_auto_introspection
assert(SCHEMA.introspection?)
assert(SCHEMA.has_field?(:query, :__schema))
assert(SCHEMA.has_field?(:query... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/sqlite/star_wars_global_id_test.rb | Ruby | mit | 190 | master | 2,716 | require 'integration/config'
class Integration_SQLite_StarWarsGlobalIDTest < GraphQL::IntegrationTestCase
load_schema 'sqlite'
SCHEMA = ::StartWarsSqliteSchema
## CREATE
def test_create_query_field
obj = source[:query][:lite_factions]
assert_gid_value('gql://star-wars-sqlite/Schema/query/liteFaction... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/sqlite/star_wars_query_test.rb | Ruby | mit | 190 | master | 3,622 | require 'integration/config'
class Integration_SQLite_StarWarsQueryTest < GraphQL::IntegrationTestCase
load_schema 'sqlite'
SCHEMA = ::StartWarsSqliteSchema
def test_query_factions
faction = named_list('Alliance to Restore the Republic', 'Galactic Empire')
assert_result({ data: { liteFactions: faction ... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/schemas/sqlite.rb | Ruby | mit | 190 | master | 3,238 | require 'active_record'
require 'active_record/database_configurations'
ActiveSupport::Inflector.inflections(:en) do |inflect|
inflect.irregular 'base', 'bases'
end
class SQLiteRecord < ActiveRecord::Base
self.abstract_class = true
establish_connection(adapter: 'sqlite3', database: ':memory:')
end
SQLiteRecor... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/schemas/mysql.rb | Ruby | mit | 190 | master | 1,664 | require 'active_record'
class MySQLRecord < ActiveRecord::Base
self.abstract_class = true
establish_connection(
name: 'mysql',
adapter: 'mysql2',
host: ENV.fetch('GQL_MYSQL_HOST', '127.0.0.1'),
database: ENV.fetch('GQL_MYSQL_DATABASE', 'starwars'),
username: ENV.fetch('GQL_MYSQL_USERNAME', 'ro... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/schemas/memory.rb | Ruby | mit | 190 | master | 6,242 | EPISODES = %w[new_hope empire jedi]
module MemoryTest
class Character
attr_accessor :id, :name
attr_writer :friends, :appears_in
def initialize(**data)
data.each { |k, v| send("#{k}=", v) }
end
def friends
@friends.map do |id|
STAR_WARS_DATA[:humans][id] || STAR_WARS_DATA[:d... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/mysql/star_wars_introspection_test.rb | Ruby | mit | 190 | master | 782 | require 'integration/config'
class Integration_MySQL_StarWarsIntrospectionTest < GraphQL::IntegrationTestCase
load_schema 'mysql'
SCHEMA = ::StartWarsMySQLSchema
def test_auto_introspection
assert(SCHEMA.introspection?)
assert(SCHEMA.has_field?(:query, :__schema))
assert(SCHEMA.has_field?(:query, :... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/memory/star_wars_validation_test.rb | Ruby | mit | 190 | master | 3,719 | require 'integration/config'
# See: https://github.com/graphql/graphql-js/blob/master/src/__tests__/starWarsValidation-test.js
class Integration_Memory_StarWarsValidationTest < GraphQL::IntegrationTestCase
load_schema 'memory'
SCHEMA = ::StartWarsMemSchema
def test_complex_but_valid_query
assert_result(nil... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/memory/star_wars_introspection_test.rb | Ruby | mit | 190 | master | 5,382 | require 'integration/config'
# See: https://github.com/graphql/graphql-js/blob/master/src/__tests__/starWarsIntrospection-test.js
class Integration_Memory_StarWarsIntrospectionTest < GraphQL::IntegrationTestCase
load_schema 'memory'
SCHEMA = ::StartWarsMemSchema
def test_auto_introspection
assert(SCHEMA.in... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/integration/memory/star_wars_query_test.rb | Ruby | mit | 190 | master | 8,104 | require 'integration/config'
# See: https://github.com/graphql/graphql-js/blob/master/src/__tests__/starWarsQuery-test.js
class Integration_Memory_StarWarsQueryTest < GraphQL::IntegrationTestCase
load_schema 'memory'
SCHEMA = ::StartWarsMemSchema
ALL_EPISODES = %w[NEW_HOPE EMPIRE JEDI]
def test_r2d2_saga_her... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type_test.rb | Ruby | mit | 190 | master | 1,589 | require 'config'
class GraphQL_TypeTest < GraphQL::TestCase
class DESCRIBED_CLASS < Rails::GraphQL::Type; end
def test_inherited
assert_equal(DESCRIBED_CLASS, DESCRIBED_CLASS.base_type)
assert_predicate(DESCRIBED_CLASS, :described_class?)
assert_predicate(DESCRIBED_CLASS, :spec_object?)
assert_pre... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/schema_test.rb | Ruby | mit | 190 | master | 4,963 | require 'config'
class GraphQL_SchemaTest < GraphQL::TestCase
DESCRIBED_CLASS = unmapped_class(Rails::GraphQL::Schema)
def test_gql_name
assert_equal('__Schema', DESCRIBED_CLASS.gql_name)
assert_equal('__Schema', DESCRIBED_CLASS.graphql_name)
end
def test_kind
assert_equal(:schema, DESCRIBED_CLAS... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/source_test.rb | Ruby | mit | 190 | master | 4,706 | require 'config'
class GraphQL_SourceTest < GraphQL::TestCase
def after
source_const.class_variable_set(:@@pending, {})
@described_class = nil
end
def described_class
@described_class ||= unmapped_class(Rails::GraphQL::Source).tap do |klass|
def klass.name; 'DESCRIBED_CLASS'; end
end
end... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type_map_test.rb | Ruby | mit | 190 | master | 11,198 | require 'config'
class GraphQL_TypeMapTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::TypeMap
SAMPLE_INDEX = {
base: { Type: { string: -> { 1 }, boolean: -> { 4 } } },
other: { Type: { string: -> { 2 }, number: -> { 3 } } },
}.freeze
def after
@subject = nil
end
def subject
@su... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/request/context_test.rb | Ruby | mit | 190 | master | 1,827 | require 'config'
class GraphQL_Request_ContextTest < GraphQL::TestCase
DESCRIBED_CLASS = Class.new(Rails::GraphQL::Request::Context)
def test_stacked
object = DESCRIBED_CLASS.new
object.stacked('a') do
object.stacked('b') do
object.stacked('c') do
object.stacked('d') do
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/request/component/operation_test.rb | Ruby | mit | 190 | master | 713 | require 'config'
class GraphQL_Request_Component_OperationTest < GraphQL::TestCase
def test_build
request = Object.new
request.define_singleton_method(:build) { |klass, *| klass }
assert_equal(klass::Query, klass.build(request, new_token('', :query)))
assert_equal(klass::Mutation, klass.build(reques... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar_test.rb | Ruby | mit | 190 | master | 1,349 | require 'config'
class GraphQL_Type_ScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = unmapped_class(Rails::GraphQL::Type::Scalar)
def test_valid_input_ask
assert(DESCRIBED_CLASS.valid_input?("abc"))
refute(DESCRIBED_CLASS.valid_input?(1))
refute(DESCRIBED_CLASS.valid_input?(nil))
end
def test_val... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/interface_test.rb | Ruby | mit | 190 | master | 2,603 | require 'config'
class GraphQL_Type_InterfaceTest < GraphQL::TestCase
DESCRIBED_CLASS = unmapped_class(Rails::GraphQL::Type::Interface)
def test_all_types
assert_nil(DESCRIBED_CLASS.all_types)
DESCRIBED_CLASS.types << :a
assert_equal([:a], DESCRIBED_CLASS.all_types.to_a)
other_class = unmapped_c... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/object_test.rb | Ruby | mit | 190 | master | 3,730 | require 'config'
class GraphQL_Type_ObjectTest < GraphQL::TestCase
DESCRIBED_CLASS = unmapped_class(Rails::GraphQL::Type::Object)
def test_valid_member_ask
fields = {
name: double(method_name: :name, null?: true, gql_name: 'n'),
age: double(method_name: :age, null?: false, gql_name: 'a'),
}
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/union_test.rb | Ruby | mit | 190 | master | 2,522 | require 'config'
class GraphQL_Type_UnionTest < GraphQL::TestCase
DESCRIBED_CLASS = unmapped_class(Rails::GraphQL::Type::Union)
def test_of_kind
field = double(base_type: 'a')
DESCRIBED_CLASS.stub(:members, [field]) do
assert_equal('a', DESCRIBED_CLASS.of_kind)
end
end
def test_equivalence
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/enum_test.rb | Ruby | mit | 190 | master | 7,253 | require 'config'
class GraphQL_Type_EnumTest < GraphQL::TestCase
DESCRIBED_CLASS = unmapped_class(Rails::GraphQL::Type::Enum)
%w[A B C].each(&DESCRIBED_CLASS.method(:add))
def test_indexed
refute_predicate(DESCRIBED_CLASS, :indexed?)
DESCRIBED_CLASS.indexed!
assert_predicate(DESCRIBED_CLASS, :indexe... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/input_test.rb | Ruby | mit | 190 | master | 4,727 | require 'config'
class GraphQL_Type_InputTest < GraphQL::TestCase
DESCRIBED_CLASS = unmapped_class(Rails::GraphQL::Type::Input)
OTHER_CLASS = unmapped_class(Rails::GraphQL::Type::Input)
def test_gql_name
DESCRIBED_CLASS.stub_ivar(:@gql_name, 'sample') do
assert_equal('sample', DESCRIBED_CLASS.gql_name... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/float_scalar_test.rb | Ruby | mit | 190 | master | 535 | require 'config'
class GraphQL_Type_Scalar_FloatScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::FloatScalar
def test_valid_input_ask
assert(DESCRIBED_CLASS.valid_input?(1.0))
refute(DESCRIBED_CLASS.valid_input?('12'))
refute(DESCRIBED_CLASS.valid_input?(10))
end
de... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/bigint_scalar_test.rb | Ruby | mit | 190 | master | 1,399 | require 'config'
class GraphQL_Type_Scalar_BigintScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::BigintScalar
LARGE_VALUE = 123456789101112131415161718192021222324252627282930
def test_valid_input_ask
refute(DESCRIBED_CLASS.valid_input?(nil))
refute(DESCRIBED_CLASS.valid_i... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/date_time_scalar_test.rb | Ruby | mit | 190 | master | 849 | require 'config'
class GraphQL_Type_Scalar_DateTimeScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::DateTimeScalar
def test_valid_input_ask
assert(DESCRIBED_CLASS.valid_input?(Time.now.iso8601))
refute(DESCRIBED_CLASS.valid_input?(1))
refute(DESCRIBED_CLASS.valid_input?(... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/boolean_scalar_test.rb | Ruby | mit | 190 | master | 1,299 | require 'config'
class GraphQL_Type_Scalar_BooleanScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::BooleanScalar
def test_valid_input_ask
assert(DESCRIBED_CLASS.valid_input?(true))
assert(DESCRIBED_CLASS.valid_input?(false))
refute(DESCRIBED_CLASS.valid_input?(nil))
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/decimal_scalar_test.rb | Ruby | mit | 190 | master | 743 | require 'config'
class GraphQL_Type_Scalar_DecimalScalarScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::DecimalScalar
def test_valid_input_ask
assert(DESCRIBED_CLASS.valid_input?('1.0'))
assert(DESCRIBED_CLASS.valid_input?('10.0'))
assert(DESCRIBED_CLASS.valid_input?('10... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/json_scalar_test.rb | Ruby | mit | 190 | master | 574 | require 'config'
class GraphQL_Type_Scalar_JsonScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::JsonScalar
def test_valid_input_ask
assert(DESCRIBED_CLASS.valid_input?({}))
refute(DESCRIBED_CLASS.valid_input?(1))
end
def test_valid_output_ask
assert(DESCRIBED_CLASS.v... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/string_scalar_test.rb | Ruby | mit | 190 | master | 505 | require 'config'
class GraphQL_Type_Scalar_StringScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::StringScalar
def test_as_json
assert_equal('1', DESCRIBED_CLASS.as_json(1))
assert_equal('', DESCRIBED_CLASS.as_json(nil))
assert_equal('a', DESCRIBED_CLASS.as_json('a'))
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/binary_scalar_test.rb | Ruby | mit | 190 | master | 551 | require 'config'
class GraphQL_Type_Scalar_BinaryScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::BinaryScalar
FILE_PATH = Pathname.new(__dir__).join('../../../assets/luke.jpg')
def test_as_json
assert_equal('MQ==', DESCRIBED_CLASS.as_json(1))
assert_equal('YQ==', DESCRIBED... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/id_scalar_test.rb | Ruby | mit | 190 | master | 740 | require 'config'
class GraphQL_Type_Scalar_IdScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::IdScalar
def test_valid_input_ask
assert(DESCRIBED_CLASS.valid_input?(12345))
assert(DESCRIBED_CLASS.valid_input?('bt3btb3t3'))
assert(DESCRIBED_CLASS.valid_input?(SecureRandom.u... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/int_scalar_test.rb | Ruby | mit | 190 | master | 763 | require 'config'
class GraphQL_Type_Scalar_IntScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::IntScalar
def test_valid_input_ask
assert(DESCRIBED_CLASS.valid_input?(12345))
assert(DESCRIBED_CLASS.valid_input?(2147483647))
refute(DESCRIBED_CLASS.valid_input?(12.0))
r... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/time_scalar_test.rb | Ruby | mit | 190 | master | 1,249 | require 'config'
class GraphQL_Type_Scalar_TimeScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::TimeScalar
def test_valid_input_ask
assert(DESCRIBED_CLASS.valid_input?('1:12'))
assert(DESCRIBED_CLASS.valid_input?('12:12'))
assert(DESCRIBED_CLASS.valid_input?('123:12'))
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/date_scalar_test.rb | Ruby | mit | 190 | master | 799 | require 'config'
class GraphQL_Type_Scalar_DateScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::DateScalar
def test_valid_input_ask
assert(DESCRIBED_CLASS.valid_input?('2020-02-02'))
refute(DESCRIBED_CLASS.valid_input?(1))
refute(DESCRIBED_CLASS.valid_input?('abc'))
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | test/graphql/type/scalar/any_scalar_test.rb | Ruby | mit | 190 | master | 884 | require 'config'
class GraphQL_Type_Scalar_AnyScalarTest < GraphQL::TestCase
DESCRIBED_CLASS = Rails::GraphQL::Type::Scalar::AnyScalar
OBJECTS = {
1 => [1, '1'],
'a' => ['a', '"a"'],
true => [true, 'true'],
4.2 => [4.2, '4.2'],
[1, 'a'] => [[1, 'a'], '[1,"a"]'],
{ a: 1, b: 'c' } => [{ 'a' ... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | ext/console.rb | Ruby | mit | 190 | master | 259 | #!/usr/bin/env ruby
require 'pathname'
require 'pry'
require 'irb'
puts 'Pre making'
system 'ruby gql_parser.rb'
puts 'Making'
system 'make'
puts 'Requiring'
require_relative './gql_parser.so'
# puts GQLParser.parse_execution("123")
ARGV.clear
IRB.start |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql.rb | Ruby | mit | 190 | master | 7,635 | # frozen_string_literal: true
require 'i18n'
require 'zlib'
require 'ostruct'
require 'active_model'
require 'active_support'
require 'active_support/core_ext/module/attribute_accessors_per_thread'
require 'active_support/core_ext/string/strip'
require 'active_support/core_ext/enumerable'
require 'rails/graphql/vers... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/railtie.rb | Ruby | mit | 190 | master | 4,589 | # frozen_string_literal: true
require 'rails/railtie'
require 'action_controller'
require 'action_controller/railtie'
module Rails
module GraphQL
# = Rails GraphQL Railtie
#
# Rails integration and configuration
class Railtie < Rails::Railtie
config.eager_load_namespaces << Rails::GraphQL
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/event.rb | Ruby | mit | 190 | master | 5,364 | # frozen_string_literal: true
module Rails
module GraphQL
# = GraphQL Event
#
# This class is responsible for triggering events. It also contains the
# +data+ that can be used on the event handlers.
class Event
attr_reader :source, :data, :event_name, :object, :last_result
alias even... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/to_gql.rb | Ruby | mit | 190 | master | 11,451 | # frozen_string_literal: true
require 'arel/visitors/visitor'
# rubocop:disable Naming/MethodParameterName, Naming/MethodName
module Rails
module GraphQL
# = GraphQL ToGQL
#
# This class can turn any class related to GraphQL into its GraphQL string
# representation. It was developed more for testing... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/source.rb | Ruby | mit | 190 | master | 8,918 | # frozen_string_literal: true
module Rails
module GraphQL
# = GraphQL Source
#
# Source is an abstract object that can contains fields, objects, and
# information that them are delivered to the relative schemas throughout
# proxies, ensuring that it still keeps the main ownership of the objects
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/request.rb | Ruby | mit | 190 | master | 20,311 | # frozen_string_literal: true
module Rails
module GraphQL
# = GraphQL Request
#
# This class is responsible for processing a GraphQL response. It will
# handle queries, mutations, and subscription, as long as all of them are
# provided together. It also can be executed multiple times using the sa... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/introspection.rb | Ruby | mit | 190 | master | 2,043 | # frozen_string_literal: true
module Rails
module GraphQL
# Module related to some methods regarding the introspection of a schema
module Introspection
# When register is called, add introspection related elements
def register!(*)
super if defined? super
enable_introspection! if !... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/type.rb | Ruby | mit | 190 | master | 4,903 | # frozen_string_literal: true
module Rails
module GraphQL
# = GraphQL Type
#
# This is the most pure object from GraphQL. Anything that a schema can
# define will be an extension of this class
# See: http://spec.graphql.org/June2018/#sec-Types
class Type
extend ActiveSupport::Autoload
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/errors.rb | Ruby | mit | 190 | master | 2,606 | # frozen_string_literal: true
module Rails
module GraphQL
# Error class tha wraps all the other error classes
StandardError = Class.new(::StandardError)
# Error class related to problems during the definition process
DefinitionError = Class.new(StandardError)
# Error class related to validation... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/argument.rb | Ruby | mit | 190 | master | 6,648 | # frozen_string_literal: true
module Rails
module GraphQL
# = GraphQL Argument
#
# This represents an item from the ArgumentsDefinition, which was supposed
# to be named InputValue, but for clarification, they work more like
# function arguments.
# See http://spec.graphql.org/June2018/#Argume... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/subscription.rb | Ruby | mit | 190 | master | 399 | # frozen_string_literal: true
module Rails
module GraphQL
# = GraphQL Subscription
#
# A namespace for storing subscription-related objects like the provider
# for a stream/websocket provider, and the store, for where the
# subscriptions are stored
module Subscription
extend ActiveSuppo... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/version.rb | Ruby | mit | 190 | master | 428 | # frozen_string_literal: true
module Rails
module GraphQL
# Returns the currently loaded version of the GraphQL as a <tt>Gem::Version</tt>.
def self.gem_version
Gem::Version.new(version)
end
def self.version
VERSION::STRING
end
module VERSION
MAJOR = 1
MINOR = 0
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/type_map.rb | Ruby | mit | 190 | master | 16,391 | # frozen_string_literal: true
require 'concurrent/map'
module Rails
module GraphQL
# = GraphQL Type Map
#
# Inspired by ActiveRecord::Type::TypeMap, this class stores all the things
# defined, their unique name, their basic settings, and correctly index
# them so they are easy to find whenever n... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/uri.rb | Ruby | mit | 190 | master | 5,167 | # frozen_string_literal: true
require 'uri/generic'
module URI
# URI::GLQ encodes objects from a GraphQL server as an URI.
# It has the components:
# All components except version and params are required.
#
# The URI format looks like "glq://namespace/class_name/gql_name".
# There are some cases where the... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/global_id.rb | Ruby | mit | 190 | master | 2,609 | # frozen_string_literal: true
require 'globalid'
module Rails
module GraphQL
# = GraphQL Global ID
#
# GraphQL implementation of the Global ID that adds extended support to how
# things are located and stored. Mostly used for caching and custom access
# to the tree and request process.
#
... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/collectors.rb | Ruby | mit | 190 | master | 303 | # frozen_string_literal: true
module Rails
module GraphQL
# All the possible collectors that uses the reverse visit approach
module Collectors
extend ActiveSupport::Autoload
autoload :HashCollector
autoload :IdentedCollector
autoload :JsonCollector
end
end
end |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/shortcuts.rb | Ruby | mit | 190 | master | 3,854 | # frozen_string_literal: true
# This exposed module allows some shortcuts while working outside of the gem
module GraphQL
autoload :BaseController, "#{__dir__}/railties/app/base_controller.rb"
autoload :BaseChannel, "#{__dir__}/railties/app/base_channel.rb"
# List of constant shortcuts, as string to not trig... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/alternative.rb | Ruby | mit | 190 | master | 542 | # frozen_string_literal: true
module Rails
module GraphQL
# Several alternatives to declare GraphQL objects
module Alternative
extend ActiveSupport::Autoload
autoload :Query
autoload :Mutation
autoload :Subscription
autoload_at "#{__dir__}/alternative/query" do
autoloa... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/directive.rb | Ruby | mit | 190 | master | 9,013 | # frozen_string_literal: true
module Rails
module GraphQL
# = GraphQL Directive
#
# This is the base object for directives definition.
# See: http://spec.graphql.org/June2018/#DirectiveDefinition
#
# Whenever you want to use a directive, you can use the ClassName(...)
# shortcut (which is... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/config.rb | Ruby | mit | 190 | master | 9,422 | # frozen_string_literal: true
module Rails
module GraphQL
AR710 = (ActiveRecord.gem_version >= Gem::Version.new('7.1.0'))
configure do |config|
# This helps to keep track of when things were cached and registered. Cached
# objects with mismatching versions need to be upgraded or simply reloaded.... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/schema.rb | Ruby | mit | 190 | master | 14,156 | # frozen_string_literal: true
module Rails
module GraphQL
# = GraphQL Schema
#
# This is a pure representation of a GraphQL schema.
# See: http://spec.graphql.org/June2018/#SchemaDefinition
#
# In addition to the spec implementation, this also allows separation by
# namespaces, where each... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/field.rb | Ruby | mit | 190 | master | 9,953 | # frozen_string_literal: true
module Rails
module GraphQL
# = GraphQL Field
#
# A field has multiple purposes, which is defined by the specific subclass
# used. They are also, in various ways, similar to arguments, since they
# tend to have the same structure.
# array as input.
#
# ==... |
github | virtualshield/rails-graphql | https://github.com/virtualshield/rails-graphql | lib/rails/graphql/helpers.rb | Ruby | mit | 190 | master | 1,392 | # frozen_string_literal: true
module Rails
module GraphQL
# All helpers that allow this gem to be flexible and extendable to any other
# sources of objects and other gems as well
module Helpers
extend ActiveSupport::Autoload
autoload :AttributeDelegator
autoload :InheritedCollection
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.