redwoodjs-stripe icon indicating copy to clipboard operation
redwoodjs-stripe copied to clipboard

Feature: Allow fragments to passed to hooks

Open chrisvdm opened this issue 1 year ago • 1 comments

Problem: Users arent able to shape the replies coming back from api side via hooks

Solution: Pass Fragments directly to hooks

const { retrieveStripeCustomer } = useStripeCustomer({
    retrieveFragment: gql`
      fragment CustomerFragment on StripeCustomer {
        id
        name
        email
      }
    `,
  })

Already able to pass fragments on useStripeCustomer and useStripeSubscriptions

chrisvdm avatar Aug 10 '23 07:08 chrisvdm