Skip to content

Commit

Permalink
Merge pull request #11 from JimmyMcKegger/styles_query
Browse files Browse the repository at this point in the history
added styles query
  • Loading branch information
JimmyMcKegger authored Mar 14, 2024
2 parents 1b29f53 + f7c9153 commit d75625b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/graphql/types/query_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ def categories(**_args)
Category.all
end

field :styles, Types::StyleType.connection_type, null: false

def styles(**_args)
Style.all
end

field :style, Types::StyleType, null: true do
description 'Find a style by ID'
argument :id, ID, required: true
Expand Down
1 change: 1 addition & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# In the development environment your application's code is reloaded any time
# it changes. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
Rails.application.config.hosts << /.*\.ngrok\-free\.app/
config.cache_classes = false

# Do not eager load code on boot.
Expand Down

0 comments on commit d75625b

Please sign in to comment.