aws-mobile-appsync-sdk-js icon indicating copy to clipboard operation
aws-mobile-appsync-sdk-js copied to clipboard

Export NormalisedCacheObject

Open mcroker opened this issue 5 years ago • 3 comments

Do you want to request a feature or report a bug? Feature

What is the current behavior?

aws-appsync does not export NormalizedCacheObject, however this is required to define an instance of the AWSAppSyncClient.

As a result I need to install apollo-cache-inmemory as a peer dependency for this type definition (with all of the resulting dependency management complications).

What is the expected behavior?

Please export NormalizedCacheObject from the aws-appsync package, so the package type definitions are all self-contained.

Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions?

"aws-sdk": "^2.564.0"

mcroker avatar Nov 06 '19 11:11 mcroker

Same applies to MutationOptions and QueryOptions...

import AWSAppSyncClient, { AWSAppSyncClientOptions, AUTH_TYPE } from 'aws-appsync';
import { NormalizedCacheObject } from 'apollo-cache-inmemory';
import { MutationOptions, QueryOptions } from 'apollo-client'

package.json (exert)

  "dependencies": {
    "aws-appsync": "^2.0.2"
  },
  "devDependencies": {
    "apollo-cache-inmemory": "1.3.12",
    "apollo-client": "2.4.6"
  },

mcroker avatar Nov 06 '19 11:11 mcroker

Hi, following up on this if any update on this (as the fix is simpler, only to export the objects but I might be wrong)

adityamatt avatar Feb 01 '23 15:02 adityamatt

Following up on the issue as it should be a simple export change which is very obvious

adityamatt avatar Jul 30 '23 09:07 adityamatt