-
Notifications
You must be signed in to change notification settings - Fork 13
Rails 6: Graphql class based approach #1623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
if next? | ||
gem "rails", '~> 6.0' | ||
else | ||
gem 'rails', '~> 5.2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bundler/DuplicatedGem: Gem rails requirements already given on line 15 of the Gemfile.
@@ -8,7 +11,11 @@ end | |||
gem 'active_record_extended' | |||
gem 'httparty' | |||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |||
gem 'rails', '~> 5.2' | |||
if next? | |||
gem "rails", '~> 6.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@@ -1,3 +1,6 @@ | |||
def next? | |||
File.basename(__FILE__) == "Gemfile.next" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@@ -1,3 +1,6 @@ | |||
def next? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
class CaesarSchema < GraphQL::Schema | ||
query(Types::QueryRoot) | ||
mutation(Types::MutationRoot) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingBlankLines: Final newline missing.
@@ -0,0 +1,9 @@ | |||
# app/graphql/types/credential_type.rb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
field 'url', String, null: true | ||
field 'status', Enums::DataRequestStatus, null: false | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/EndAlignment: end at 12, 2 is not aligned with module at 2, 0.
@@ -0,0 +1,12 @@ | |||
# app/graphql/types/data_request.rb | |||
module Types | |||
class DataRequest < GraphQL::Schema::Object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/IndentationWidth: Use 2 (not 4) spaces for indentation.
Style/Documentation: Missing top-level class documentation comment.
@@ -0,0 +1,12 @@ | |||
# app/graphql/types/data_request.rb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
# app/graphql/types/enums/data_request_requested_data.rb | ||
module Types | ||
module Enums | ||
class DataRequestRequestedData < GraphQL::Schema::Enum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/Documentation: Missing top-level class documentation comment.
Error is caused due to changes from use of objects to classes from graphql
1.xx
to2.xx
See:
https://imaharu.github.io/graphql-ruby-doc-ja/schema/class_based_api.html
https://graphql-ruby.org/mutations/mutation_classes