File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -260,9 +260,16 @@ protected static function handleFields(
260
260
261
261
protected static function isMongodbInstance (GraphqlType $ parentType ): bool
262
262
{
263
- $ mongoType = 'Jenssegers\Mongodb\Eloquent\Model ' ;
263
+ $ jenssegersMongoType = 'Jenssegers\Mongodb\Eloquent\Model ' ;
264
+ $ laravelMongoType = 'MongoDB\Laravel\Eloquent\Model ' ;
264
265
265
- return isset ($ parentType ->config ['model ' ]) ? app ($ parentType ->config ['model ' ]) instanceof $ mongoType : false ;
266
+ if (isset ($ parentType ->config ['model ' ])) {
267
+ $ modelInstance = app ($ parentType ->config ['model ' ]);
268
+
269
+ return $ modelInstance instanceof $ jenssegersMongoType || $ modelInstance instanceof $ laravelMongoType ;
270
+ }
271
+
272
+ return false ;
266
273
}
267
274
268
275
/**
You can’t perform that action at this time.
0 commit comments