-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working toward including response in GraphQL
GraphQL GraphQL
- Loading branch information
1 parent
14858ad
commit 10e4160
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
module Types | ||
class CategoriesType < Types::BaseObject | ||
description 'Information about one category linked to this search term' | ||
|
||
field :confidence, Float, null: false, description: 'The application\'s confidence that the term belongs to this category - measured from 0.0 to 1.0' | ||
field :name, String, null: false, description: 'The name of this category' | ||
|
||
def name | ||
@object.category.name | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters