Skip to content

Commit 3f72850

Browse files
committed
Fixes
1 parent 883f9c3 commit 3f72850

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"app": "latest"
5656
},
5757
"peerDependencies": {
58-
"@vuex-orm/core": "^0.30.0"
58+
"@vuex-orm/core": "^0.31.10"
5959
},
6060
"devDependencies": {
6161
"@commitlint/cli": "^7.1.2",

src/graphql/schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ export default class Schema {
109109
let type = this.getRealType(field.type);
110110

111111
if (type.kind === "LIST") {
112-
while (type.name === null) type = type.ofType;
112+
while (!type.name) type = type.ofType;
113113
return `[${type.name}]`;
114114
} else {
115-
while (type.name === null) type = type.ofType;
115+
while (!type.name) type = type.ofType;
116116

117117
/* istanbul ignore next */
118118
if (!type.name) throw new Error(`Can't find type name for field ${field.name}`);

src/graphql/transformer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export default class Transformer {
142142
result = data.map((d: any) => this.transformIncomingData(d, model, mutation, true));
143143
} else {
144144
Object.keys(data).forEach(key => {
145-
if (key in data) {
145+
if (data[key] !== undefined && data[key] !== null && key in data) {
146146
if (isPlainObject(data[key])) {
147147
const localModel: Model = context.getModel(key, true) || model;
148148

test/support/mock-schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ export const typeDefs = `
175175
otherId: ID
176176
published: Boolean
177177
author: UserInput
178+
tags: [TagInput!]
178179
}
179180
180181

0 commit comments

Comments
 (0)