DEV Community

loading...

Discussion on: Ruby on Rails GraphQL API Tutorial: Filtering with Custom Fields and Class Methods

Collapse
prettycoder profile image
Maia Engeli

Hi Isa, thanks for these tutorials, so great to get started with graphql.

I ran into a problem, looks like there shouldn't be a do in this def:

def successful do
  where("status = ?", "Successful")
end
Collapse
isalevine profile image
Isa Levine Author

Yes, you are absolutely right Maia--thank you for catching that! The only do should be after has_many :payments do. Snippet has been corrected! :)