Skip to content

Brianna/step two#17

Draft
BCerki wants to merge 9 commits intobutton-inc:mainfrom
BCerki:brianna/step-two
Draft

Brianna/step two#17
BCerki wants to merge 9 commits intobutton-inc:mainfrom
BCerki:brianna/step-two

Conversation

@BCerki
Copy link

@BCerki BCerki commented Feb 28, 2022

No description provided.

@BCerki
Copy link
Author

BCerki commented Feb 28, 2022

Successfully queried:
Screenshot from 2022-02-28 10-11-47

-- requires: todos
-- requires: todo_appschema

BEGIN;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our team's code style is all lowercase for SQL code


BEGIN;

create or replace function todo_app.insert_todo(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Postgraphile should already expose a mutation that you can call, out of the box:

mutation InsertTodo {
  createToDo(
    input: { 
      todo: { task: 'The Task\'s name', completed: false }
    }
  ) 
  {
    # ... whatever you want returned , or '__typename' if nothing
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants