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

Typescript Support #66

Open
edmondecad opened this issue Sep 4, 2022 · 1 comment
Open

Typescript Support #66

edmondecad opened this issue Sep 4, 2022 · 1 comment

Comments

@edmondecad
Copy link

Hello, I am trying to use this for a RedwoodJS Typescript project but I am running into a few errors.

The first issue was that the StripeItemsParamsInput type was unknown.

  • I copied the stripeItem.sdl.ts and customerPortal.sdl.ts and got that working.

But now my GraphQL query returns null for the query below.

export const QUERY = gql`
  query StripeItems($params: StripeItemsParamsInput) {
    stripeItems(params: $params) {
      id
      name
      description
      images
      price
      type
    }
  }
`

This only happens when in the Redwood Typescript app. When I try this in a Redwood Javascript app, it works fine with the same Stripe account.

One difference I noticed was that the Javascript app has the following in graphql.js while the Typescript app doesn't. I'm not sure if this is whats causing it. I did not do anything other than the installation instructions and adding the two SDL files above.

Thank you for your time.

@tomjdickson
Copy link

I believe once the SDL file is defined in your project it's expecting a service to relate to it within your project and not "stripeServices". Hence why your query won't be working.

Not sure how we can resolve this at the moment, I am assuming in a production environment you'll probably end up building your own query and input types anyway.

@chrisvdm chrisvdm added this to In progress in redwoodjs-stripe Sep 20, 2022
@chrisvdm chrisvdm moved this from In progress to To do in redwoodjs-stripe Jul 17, 2023
@chrisvdm chrisvdm moved this from To do to In progress in redwoodjs-stripe May 21, 2024
@chrisvdm chrisvdm moved this from In progress to To do in redwoodjs-stripe May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants