Skip to content

Commit 91018b1

Browse files
author
matthew fong
committed
changes name to graphql-eager_load
1 parent c3ee0d6 commit 91018b1

12 files changed

+35
-35
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source 'https://rubygems.org'
44

5-
# Specify your gem's dependencies in graphql-eager-loader.gemspec
5+
# Specify your gem's dependencies in graphql-eager-load.gemspec
66
gemspec
77

88
gem 'graphql'

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
graphql-eager_loader (0.2.2)
4+
graphql-eager_load (0.2.2)
55

66
GEM
77
remote: https://rubygems.org/
@@ -188,7 +188,7 @@ PLATFORMS
188188
DEPENDENCIES
189189
combustion
190190
graphql
191-
graphql-eager_loader!
191+
graphql-eager_load!
192192
rails
193193
rake
194194
rspec

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# Graphql::EagerLoader
1+
# Graphql::EagerLoad
22

33
This gem traverses your graphql query looking for fields on types that match
44
associations on those types. For each field found to be an association, this
5-
gem adds those associations to an [ActiveRecord::QueryMethods#includes](https://api.rubyonrails.org/classes/ActiveRecord/QueryMethods.html#method-i-includes) hash. That hash can then be used to
6-
eager load the associations of records returned in your graphql resolver.
5+
gem adds those associations to an [ActiveRecord::QueryMethods#includes](https://api.rubyonrails.org/classes/ActiveRecord/QueryMethods.html#method-i-includes) hash. That hash can then be used to
6+
eager load the associations of records returned in your graphql resolver.
77

88
## Installation
99

1010
Add this line to your application's Gemfile:
1111

1212
```ruby
13-
gem 'graphql-eager_loader', git: 'https://github.com/hoverinc/graphql-eager_loader.git'
13+
gem 'graphql-eager_load'
1414
```
1515

1616
And then execute:
@@ -23,7 +23,7 @@ And then execute:
2323
module Resolvers
2424
class Users < Resolvers::Base
2525
eager_load_model ::User
26-
26+
2727
type Types::User.connection_type, null: false
2828

2929
def resolve
@@ -33,7 +33,7 @@ module Resolvers
3333
end
3434
```
3535

36-
The `.eager_load_model` and `#associations_to_eager_load` methods are provided by this gem.
36+
The `.eager_load_model` and `#associations_to_eager_load` methods are provided by this gem.
3737

3838
## Development
3939

@@ -43,13 +43,13 @@ To release a new version:
4343

4444
- Update the version number in `version.rb`
4545
- Make a PR with your changes and the version number increment
46-
- After the PR is merged, make the new release https://github.com/hoverinc/graphql-eager-loader/releases
46+
- After the PR is merged, make the new release https://github.com/hoverinc/graphql-eager-load/releases
4747

4848
## Contributing
4949

50-
Bug reports and pull requests are welcome on GitHub at https://github.com/hoverinc/graphql-eager-loader.
50+
Bug reports and pull requests are welcome on GitHub at https://github.com/hoverinc/graphql-eager-load.
5151

5252

5353
## License
5454

55-
HOVER owns it. Ask Legal.
55+
MIT

bin/console

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env ruby
22

33
require 'bundler/setup'
4-
require 'graphql/eager_loader'
4+
require 'graphql/eager_load'
55

66
# You can add fixtures and/or initialization code here to make experimenting
77
# with your gem easier. You can also use a different console, if you like.

graphql-eager-loader.gemspec renamed to graphql-eager-load.gemspec

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
# frozen_string_literal: true
22

3-
require_relative 'lib/graphql/eager_loader/version'
3+
require_relative 'lib/graphql/eager_load/version'
44

55
Gem::Specification.new do |spec|
6-
spec.name = 'graphql-eager_loader'
7-
spec.version = Graphql::EagerLoader::VERSION
6+
spec.name = 'graphql-eager_load'
7+
spec.version = Graphql::EagerLoad::VERSION
88
spec.authors = ['Elise Wood']
99
spec.email = ['elise@hover.to']
1010

1111
spec.summary = 'Generate ActiveRecord eager loading options from GraphQL Queries.'
1212
spec.description = ''
13-
spec.homepage = 'https://github.com/hoverinc/graphql-eager-loader.'
13+
spec.homepage = 'https://github.com/hoverinc/graphql-eager-load'
1414
spec.license = 'MIT'
1515
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
1616

17-
# spec.metadata['allowed_push_host'] = 'github.com/hoverinc/graphql-eager-loader'
17+
# spec.metadata['allowed_push_host'] = 'github.com/hoverinc/graphql-eager-load'
1818

1919
spec.metadata['homepage_uri'] = spec.homepage
20-
spec.metadata['source_code_uri'] = 'https://github.com/hoverinc/graphql-eager-loader'
21-
spec.metadata['changelog_uri'] = 'https://github.com/hoverinc/graphql-eager-loader/commits'
20+
spec.metadata['source_code_uri'] = 'https://github.com/hoverinc/graphql-eager-load'
21+
spec.metadata['changelog_uri'] = 'https://github.com/hoverinc/graphql-eager-load/commits'
2222

2323
# Specify which files should be added to the gem when it is released.
2424
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.

lib/graphql/eager_load.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
require 'graphql'
4+
require 'graphql/eager_load/version'
5+
require 'graphql/eager_load/builder'
6+
require 'graphql/eager_load/resolver'
7+
8+
GraphQL::Schema::Resolver.include Graphql::EagerLoad::Resolver

lib/graphql/eager_loader/builder.rb renamed to lib/graphql/eager_load/builder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
module Graphql
4-
module EagerLoader
4+
module EagerLoad
55
#
66
# Given
77
# - An initial set of includes, a hash

lib/graphql/eager_loader/resolver.rb renamed to lib/graphql/eager_load/resolver.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
module Graphql
4-
module EagerLoader
4+
module EagerLoad
55
# Automatically included in any subclasses of Resolvers::Base
66
module Resolver
77
def self.included(klass)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
module Graphql
4-
module EagerLoader
4+
module EagerLoad
55
VERSION = '0.2.2'
66
end
77
end

lib/graphql/eager_loader.rb

Lines changed: 0 additions & 8 deletions
This file was deleted.

spec/graphql/eager_loader_spec.rb renamed to spec/graphql/eager_load_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# frozen_string_literal: true
22

3-
RSpec.describe Graphql::EagerLoader do
3+
RSpec.describe Graphql::EagerLoad do
44
it 'has a version number' do
5-
expect(Graphql::EagerLoader::VERSION).not_to be nil
5+
expect(Graphql::EagerLoad::VERSION).not_to be nil
66
end
77

88
describe '.call' do
@@ -16,7 +16,7 @@
1616
closure_model = model
1717

1818
Class.new do
19-
include Graphql::EagerLoader::Resolver
19+
include Graphql::EagerLoad::Resolver
2020
eager_load_model closure_model
2121

2222
define_method(:context) do

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'bundler'
44
require 'bundler/setup'
5-
require 'graphql/eager_loader'
5+
require 'graphql/eager_load'
66

77
Bundler.require :default, :development
88

0 commit comments

Comments
 (0)