Skip to content

Commit 6da8988

Browse files
committed
fix: layer input could not allow saving of heatmap layer
1 parent 268b16e commit 6da8988

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/schema/inputs/layer.input.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ const LayerLayerSymbolInputType = new GraphQLInputObjectType({
2020
}),
2121
});
2222

23+
/** GraphQL Layer Gradient step input type definition (for heatmap) */
24+
// eslint-disable-next-line @typescript-eslint/naming-convention
25+
const LayerGradientStepInputType = new GraphQLInputObjectType({
26+
name: 'LayerGradientStepInputType',
27+
fields: () => ({
28+
color: { type: GraphQLString },
29+
ratio: { type: GraphQLFloat },
30+
}),
31+
});
32+
2333
/** GraphQL Layer DrawingInfo input type definition */
2434
// eslint-disable-next-line @typescript-eslint/naming-convention
2535
const LayerDrawingInfoInputType = new GraphQLInputObjectType({
@@ -33,7 +43,8 @@ const LayerDrawingInfoInputType = new GraphQLInputObjectType({
3343
symbol: { type: LayerLayerSymbolInputType },
3444
blur: { type: GraphQLFloat },
3545
radius: { type: GraphQLFloat },
36-
gradient: { type: GraphQLString },
46+
minOpacity: { type: GraphQLFloat },
47+
gradient: { type: GraphQLList(LayerGradientStepInputType) },
3748
}),
3849
}),
3950
},

0 commit comments

Comments
 (0)