Skip to content

Commit

Permalink
add database name
Browse files Browse the repository at this point in the history
  • Loading branch information
RangelReale committed Jun 12, 2024
1 parent 4a7eb04 commit 4b819f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func ResolverFunc(ctx context.Context, mdb *mongo.Database) debefix.ResolveCallb

// ResolverDBCallback is a db.ResolverDBCallback to generate MongoDB collection records.
func ResolverDBCallback(ctx context.Context, db *mongo.Database) db.ResolverDBCallback {
return func(tableName string, fields map[string]any, returnFieldNames []string) (map[string]any, error) {
return func(databaseName, tableName string, fields map[string]any, returnFieldNames []string) (map[string]any, error) {

Check failure on line 24 in resolver.go

View workflow job for this annotation

GitHub Actions / build

cannot use func(databaseName, tableName string, fields map[string]any, returnFieldNames []string) (map[string]any, error) {…} (value of type func(databaseName string, tableName string, fields map[string]any, returnFieldNames []string) (map[string]any, error)) as db.ResolverDBCallback value in return statement
collection := db.Collection(tableName)

res, err := collection.InsertOne(ctx, fields)
Expand Down

0 comments on commit 4b819f4

Please sign in to comment.