Skip to content

Commit

Permalink
re-add name for pg dialect conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Guido committed Apr 16, 2021
1 parent 580e80d commit 54a30d0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@

# -- Intersphinx ---------------------

intersphinx_mapping = {'graphql': ('https://graphql-core-3.readthedocs.io/en/stable', None)}
intersphinx_mapping = {"graphql": ("https://graphql-core-3.readthedocs.io/en/stable", None)}
7 changes: 5 additions & 2 deletions src/graphql_sqlalchemy/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@
from .types import Inputs

ORDER_BY_ENUM = GraphQLEnumType("order_by", {"desc": "desc", "asc": "asc"})
ON_CONFLICT_INPUT = GraphQLInputObjectType("on_conflict_input", {
ON_CONFLICT_INPUT = GraphQLInputObjectType(
"on_conflict_input",
{
"merge": GraphQLInputField(GraphQLNonNull(GraphQLBoolean)),
})
},
)


def get_comparison_input_type(column: Column, inputs: Inputs) -> GraphQLInputObjectType:
Expand Down
4 changes: 4 additions & 0 deletions src/graphql_sqlalchemy/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def get_model_insert_one_object_name(model: DeclarativeMeta) -> str:
return f"insert_{get_table_name(model)}_one"


def get_model_conflict_input_name(model: DeclarativeMeta) -> str:
return f"{get_table_name(model)}_on_conflict"


def get_model_mutation_response_object_name(model: DeclarativeMeta) -> str:
return f"{get_table_name(model)}_mutation_response"

Expand Down

0 comments on commit 54a30d0

Please sign in to comment.