SharmaPawan11 / vendure-razorpay-payment-plugin

Razorpay Plugin for Vendure
MIT License
7 stars 0 forks source link

gql import package #2

Open radhey-vigilant opened 6 months ago

radhey-vigilant commented 6 months ago

The line to import gql in razorpay-plugin.ts is import { gql } from "apollo-server-core";

So after installing the plugin, an error is being thrown saying "apollo-server-core" module not found. To address that I am having to install the package separately. Do you think importing from graphql-tag instead would remove this dependency and need for additional installation? And other vendure related dependencies can be installed as dev dependencies as show here in the example plugin https://github.com/vendure-ecommerce/plugin-template/blob/master/package.json ?

SharmaPawan11 commented 6 months ago

Do the issue resolve after installing it separately ?

radhey-vigilant commented 6 months ago

yeah. Although I am working with an npm workspaces monorepo. Perhaps the issue may be due to that? I am not sure. But installing apollo-server-core separately did resolve it.

SharmaPawan11 commented 6 months ago

Actually, I developed this plugin before the existence of plugin-template repo/guidelines . It is completely possible that now there is a newer and better way to create/import dependencies for vendure plugin. You may raise a pull request after testing your new approach and I'll merge it after testing.

radhey-vigilant commented 6 months ago

Alright, I'll do that. thanks.