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

Create macros #36

Open
yordis opened this issue Nov 5, 2018 · 0 comments
Open

Create macros #36

yordis opened this issue Nov 5, 2018 · 0 comments

Comments

@yordis
Copy link
Contributor

yordis commented Nov 5, 2018

  defmacro payload_object(payload_name, result_object_name) do
    quote location: :keep do

      object unquote(payload_name) do
        field :successful, non_null(:boolean), description: "Indicates if the mutation completed successfully or not. "
        field :messages, list_of(:validation_message), description: "A list of failed validations. May be blank or null if mutation succeeded."
        field :result, unquote(result_object_name), description: "The object created/updated/deleted by the mutation. May be null if mutation failed."
      end
    end
  end
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

No branches or pull requests

1 participant