Add more fields to api.yml
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
User:
|
||||
fields:
|
||||
id: integer
|
||||
username: string
|
||||
id: integer
|
||||
username: string
|
||||
debates: [Debate]
|
||||
proposals: [Proposal]
|
||||
comments: [Comment]
|
||||
Voter:
|
||||
fields:
|
||||
gender: string
|
||||
@@ -24,6 +27,7 @@ Debate:
|
||||
geozone: Geozone
|
||||
comments: [Comment]
|
||||
public_author: User
|
||||
votes: [Vote]
|
||||
Proposal:
|
||||
fields:
|
||||
id: integer
|
||||
@@ -45,6 +49,7 @@ Proposal:
|
||||
comments: [Comment]
|
||||
proposal_notifications: [ProposalNotification]
|
||||
public_author: User
|
||||
votes: [Vote]
|
||||
Comment:
|
||||
fields:
|
||||
id: integer
|
||||
@@ -58,6 +63,7 @@ Comment:
|
||||
ancestry: string
|
||||
confidence_score: integer
|
||||
public_author: User
|
||||
votes: [Vote]
|
||||
Geozone:
|
||||
fields:
|
||||
id: integer
|
||||
|
||||
@@ -9,7 +9,7 @@ QueryType = query_type_creator.create
|
||||
|
||||
ConsulSchema = GraphQL::Schema.define do
|
||||
query QueryType
|
||||
max_depth 10
|
||||
max_depth 12
|
||||
|
||||
resolve_type -> (object, ctx) do
|
||||
type_name = object.class.name # look up types by class name
|
||||
|
||||
Reference in New Issue
Block a user