Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brianna/step two #17

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Brianna/step two #17

wants to merge 9 commits into from

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