Linked to #9
In version 5.1.1, when attempting to use GraphQLRequestin our server-side code:
import {GraphQLRequest} from "@rcsb/rcsb-api-tools/lib/RcsbGraphQL/GraphQLRequest";
We get this error:
Cannot find module '/<PROJECT_FOLDER>/node_modules/@rcsb/rcsb-api-tools/lib/RcsbLocalStorage/LocalStorageTools' imported from /<PROJECT_FOLDER>/node_modules/@rcsb/rcsb-api-tools/lib/RcsbGraphQL/GraphQLRequest.js
It should be noted that it worked before (v4.3.1) (and LocalStorageTools was already present in this version).
It seems that some changes in package configuration confuses bundlers, and then are unable to resolve the import {LocalStorageTools as LST} from "../RcsbLocalStorage/LocalStorageTools" directive in src/RcsbGraphQL/GraphQLRequest.ts.
If we attempt to use the commonJS version:
import pkg from '@rcsb/rcsb-api-tools';
const {GraphQLRequest} = pkg;
const RCSBGraphQLClient = new GraphQLRequest('sequence-coordinates', { fetch: fetch });
// ...code
we get an Error: GraphQLRequest is not a constructor
Linked to #9
In version
5.1.1, when attempting to useGraphQLRequestin our server-side code:We get this error:
It should be noted that it worked before (v4.3.1) (and
LocalStorageToolswas already present in this version).It seems that some changes in package configuration confuses bundlers, and then are unable to resolve the
import {LocalStorageTools as LST} from "../RcsbLocalStorage/LocalStorageTools"directive insrc/RcsbGraphQL/GraphQLRequest.ts.If we attempt to use the commonJS version:
we get an Error:
GraphQLRequest is not a constructor