vtex-apps / store-graphql

GraphQL schema and resolvers for the VTEX Commerce Stores API
78 stars 45 forks source link

Error TS2698 Spread types may only be created from object types. #425

Open calixfar opened 4 years ago

calixfar commented 4 years ago

Error while trying to link store-graphql app.

The error is presented in the following route:

../../../cache/link/link_tiendasel_tiendasel/vtex.store-graphql@2.111.0/src/node/resolvers/document/index.ts:47:13

The solution was simple, it consists in adding to the constant data of line 45 the type of data any. The result is as follows:

const data: any = await masterdata.getSchema (dataEntity, schema);

When trying to link again the error disappears

vitia-fritelle commented 2 years ago

Is this error still open?