Skip to content

Commit

Permalink
Query fact_check and explainer by id (#1980)
Browse files Browse the repository at this point in the history
  • Loading branch information
amoedoamorim authored Aug 2, 2024
1 parent f3c18a0 commit 1201817
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/graph/types/query_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ def feed_team(id: nil, feed_id: nil, team_slug: nil)
feed
request
tipline_message
fact_check
explainer
].each do |type|
field type,
"#{type.to_s.camelize}Type",
Expand Down
10 changes: 10 additions & 0 deletions lib/relay.idl
Original file line number Diff line number Diff line change
Expand Up @@ -11884,6 +11884,16 @@ type Query {
bot_user(id: ID!): BotUser
dynamic_annotation_field(only_cache: Boolean, query: String!): DynamicAnnotationField

"""
Information about the explainer with given id
"""
explainer(id: ID!): Explainer

"""
Information about the fact_check with given id
"""
fact_check(id: ID!): FactCheck

"""
Information about the feed with given id
"""
Expand Down
58 changes: 58 additions & 0 deletions public/relay.json
Original file line number Diff line number Diff line change
Expand Up @@ -62796,6 +62796,64 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "explainer",
"description": "Information about the explainer with given id",
"args": [
{
"name": "id",
"description": null,
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "ID",
"ofType": null
}
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
}
],
"type": {
"kind": "OBJECT",
"name": "Explainer",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "fact_check",
"description": "Information about the fact_check with given id",
"args": [
{
"name": "id",
"description": null,
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "ID",
"ofType": null
}
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
}
],
"type": {
"kind": "OBJECT",
"name": "FactCheck",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "feed",
"description": "Information about the feed with given id",
Expand Down

0 comments on commit 1201817

Please sign in to comment.