You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.
I am using hasura as a graphql server and this is the generated schema having 1 table called contacts, its a lot but thought I would share it
schema {
query: query_rootmutation: mutation_rootsubscription: subscription_root
}
"""whether this query should be cached (Hasura Cloud only)"""directive@cached(
"""measured in seconds"""ttl: Int! = 60"""refresh the cache entry"""refresh: Boolean! = false
) onQUERY"""Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'."""inputString_comparison_exp {
_eq: String_gt: String_gte: String"""does the column match the given case-insensitive pattern"""_ilike: String_in: [String!]
""" does the column match the given POSIX regular expression, case insensitive """_iregex: String_is_null: Boolean"""does the column match the given pattern"""_like: String_lt: String_lte: String_neq: String"""does the column NOT match the given case-insensitive pattern"""_nilike: String_nin: [String!]
""" does the column NOT match the given POSIX regular expression, case insensitive """_niregex: String"""does the column NOT match the given pattern"""_nlike: String""" does the column NOT match the given POSIX regular expression, case sensitive """_nregex: String"""does the column NOT match the given SQL regular expression"""_nsimilar: String""" does the column match the given POSIX regular expression, case sensitive """_regex: String"""does the column match the given SQL regular expression"""_similar: String
}
"""columns and relationships of "contacts""""typecontacts {
created_at: timestamptz!first_name: String!id: uuid!last_name: String!updated_at: timestamptz!
}
"""aggregated selection of "contacts""""typecontacts_aggregate {
aggregate: contacts_aggregate_fieldsnodes: [contacts!]!
}
"""aggregate fields of "contacts""""typecontacts_aggregate_fields {
count(columns: [contacts_select_column!], distinct: Boolean): Int!max: contacts_max_fieldsmin: contacts_min_fields
}
"""Boolean expression to filter rows from the table "contacts". All fields are combined with a logical 'AND'."""inputcontacts_bool_exp {
_and: [contacts_bool_exp!]
_not: contacts_bool_exp_or: [contacts_bool_exp!]
created_at: timestamptz_comparison_expfirst_name: String_comparison_expid: uuid_comparison_explast_name: String_comparison_expupdated_at: timestamptz_comparison_exp
}
"""unique or primary key constraints on table "contacts""""enumcontacts_constraint {
""" unique or primary key constraint on columns "id" """ contacts_pkey
}
"""input type for inserting data into table "contacts""""inputcontacts_insert_input {
created_at: timestamptzfirst_name: Stringid: uuidlast_name: Stringupdated_at: timestamptz
}
"""aggregate max on columns"""typecontacts_max_fields {
created_at: timestamptzfirst_name: Stringid: uuidlast_name: Stringupdated_at: timestamptz
}
"""aggregate min on columns"""typecontacts_min_fields {
created_at: timestamptzfirst_name: Stringid: uuidlast_name: Stringupdated_at: timestamptz
}
"""response of any mutation on the table "contacts""""typecontacts_mutation_response {
"""number of rows affected by the mutation"""affected_rows: Int!"""data from the rows affected by the mutation"""returning: [contacts!]!
}
"""on_conflict condition type for table "contacts""""inputcontacts_on_conflict {
constraint: contacts_constraint!update_columns: [contacts_update_column!]! = []
where: contacts_bool_exp
}
"""Ordering options when selecting data from "contacts"."""inputcontacts_order_by {
created_at: order_byfirst_name: order_byid: order_bylast_name: order_byupdated_at: order_by
}
"""primary key columns input for table: contacts"""inputcontacts_pk_columns_input {
id: uuid!
}
"""select columns of table "contacts""""enumcontacts_select_column {
"""column name""" created_at"""column name""" first_name"""column name""" id"""column name""" last_name"""column name""" updated_at
}
"""input type for updating data in table "contacts""""inputcontacts_set_input {
created_at: timestamptzfirst_name: Stringid: uuidlast_name: Stringupdated_at: timestamptz
}
"""Streaming cursor of the table "contacts""""inputcontacts_stream_cursor_input {
"""Stream column input with initial value"""initial_value: contacts_stream_cursor_value_input!"""cursor ordering"""ordering: cursor_ordering
}
"""Initial value of the column from where the streaming should start"""inputcontacts_stream_cursor_value_input {
created_at: timestamptzfirst_name: Stringid: uuidlast_name: Stringupdated_at: timestamptz
}
"""update columns of table "contacts""""enumcontacts_update_column {
"""column name""" created_at"""column name""" first_name"""column name""" id"""column name""" last_name"""column name""" updated_at
}
inputcontacts_updates {
"""sets the columns of the filtered rows to the given values"""_set: contacts_set_inputwhere: contacts_bool_exp!
}
"""ordering argument of a cursor"""enumcursor_ordering {
"""ascending ordering of the cursor""" ASC"""descending ordering of the cursor""" DESC
}
"""mutation root"""typemutation_root {
""" delete data from the table: "contacts" """delete_contacts(
"""filter the rows which have to be deleted"""where: contacts_bool_exp!
): contacts_mutation_response""" delete single row from the table: "contacts" """delete_contacts_by_pk(id: uuid!): contacts""" insert data into the table: "contacts" """insert_contacts(
"""the rows to be inserted"""objects: [contacts_insert_input!]!"""upsert condition"""on_conflict: contacts_on_conflict
): contacts_mutation_response""" insert a single row into the table: "contacts" """insert_contacts_one(
"""the row to be inserted"""object: contacts_insert_input!"""upsert condition"""on_conflict: contacts_on_conflict
): contacts""" update data of the table: "contacts" """update_contacts(
"""sets the columns of the filtered rows to the given values"""_set: contacts_set_input"""filter the rows which have to be updated"""where: contacts_bool_exp!
): contacts_mutation_response""" update single row of the table: "contacts" """update_contacts_by_pk(
"""sets the columns of the filtered rows to the given values"""_set: contacts_set_inputpk_columns: contacts_pk_columns_input!
): contacts""" update multiples rows of table: "contacts" """update_contacts_many(
"""updates to execute, in order"""updates: [contacts_updates!]!
): [contacts_mutation_response]
}
"""column ordering options"""enumorder_by {
"""in ascending order, nulls last""" asc"""in ascending order, nulls first""" asc_nulls_first"""in ascending order, nulls last""" asc_nulls_last"""in descending order, nulls first""" desc"""in descending order, nulls first""" desc_nulls_first"""in descending order, nulls last""" desc_nulls_last
}
typequery_root {
""" fetch data from the table: "contacts" """contacts(
"""distinct select on columns"""distinct_on: [contacts_select_column!]
"""limit the number of rows returned"""limit: Int"""skip the first n rows. Use only with order_by"""offset: Int"""sort the rows by one or more columns"""order_by: [contacts_order_by!]
"""filter the rows returned"""where: contacts_bool_exp
): [contacts!]!""" fetch aggregated fields from the table: "contacts" """contacts_aggregate(
"""distinct select on columns"""distinct_on: [contacts_select_column!]
"""limit the number of rows returned"""limit: Int"""skip the first n rows. Use only with order_by"""offset: Int"""sort the rows by one or more columns"""order_by: [contacts_order_by!]
"""filter the rows returned"""where: contacts_bool_exp
): contacts_aggregate!"""fetch data from the table: "contacts" using primary key columns"""contacts_by_pk(id: uuid!): contacts
}
typesubscription_root {
""" fetch data from the table: "contacts" """contacts(
"""distinct select on columns"""distinct_on: [contacts_select_column!]
"""limit the number of rows returned"""limit: Int"""skip the first n rows. Use only with order_by"""offset: Int"""sort the rows by one or more columns"""order_by: [contacts_order_by!]
"""filter the rows returned"""where: contacts_bool_exp
): [contacts!]!""" fetch aggregated fields from the table: "contacts" """contacts_aggregate(
"""distinct select on columns"""distinct_on: [contacts_select_column!]
"""limit the number of rows returned"""limit: Int"""skip the first n rows. Use only with order_by"""offset: Int"""sort the rows by one or more columns"""order_by: [contacts_order_by!]
"""filter the rows returned"""where: contacts_bool_exp
): contacts_aggregate!"""fetch data from the table: "contacts" using primary key columns"""contacts_by_pk(id: uuid!): contacts""" fetch data from the table in a streaming manner : "contacts" """contacts_stream(
"""maximum number of rows returned in a single batch"""batch_size: Int!"""cursor to stream the results returned by the query"""cursor: [contacts_stream_cursor_input]!"""filter the rows returned"""where: contacts_bool_exp
): [contacts!]!
}
scalartimestamptz"""Boolean expression to compare columns of type "timestamptz". All fields are combined with logical 'AND'."""inputtimestamptz_comparison_exp {
_eq: timestamptz_gt: timestamptz_gte: timestamptz_in: [timestamptz!]
_is_null: Boolean_lt: timestamptz_lte: timestamptz_neq: timestamptz_nin: [timestamptz!]
}
scalaruuid"""Boolean expression to compare columns of type "uuid". All fields are combined with logical 'AND'."""inputuuid_comparison_exp {
_eq: uuid_gt: uuid_gte: uuid_in: [uuid!]
_is_null: Boolean_lt: uuid_lte: uuid_neq: uuid_nin: [uuid!]
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When a GraphQL Schema allows optional parameters, create them as optional parameters in the generated function.
For example with the GraphQL Schema that is at the bottom of this issue, you can do queries like this:
Which would be nice to translate to the generated functions like this:
And allowing for the optional parameters like:
I am using hasura as a graphql server and this is the generated schema having 1 table called
contacts
, its a lot but thought I would share itThe text was updated successfully, but these errors were encountered: