-
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 GraphQL tests
- Loading branch information
1 parent
65e2d5c
commit 02bc065
Showing
5 changed files
with
73 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# == Schema Information | ||
# | ||
# Table name: categorizations | ||
# | ||
# id :integer not null, primary key | ||
# category_id :integer not null | ||
# term_id :integer not null | ||
# confidence :float | ||
# detector_version :string | ||
# created_at :datetime not null | ||
# updated_at :datetime not null | ||
# | ||
one: | ||
category: transactional | ||
term: doi | ||
confidence: 0.95 | ||
detector_version: 1 |