Hello,
API version: 2021-10
When I’m trying to create a sellingPlanGroup, I’m getting an error: SELLING_PLAN_PRICING_POLICIES_MUST_CONTAIN_A_FIXED_PRICING_POLICY
I saw on this post that the issue was resolved but I still have the error.
Here is my mutation:
import { gql } from 'apollo-boost';
export const sellingPlanGroupCreateMutation = gql`
mutation {
sellingPlanGroupCreate(
input: {
name: "Test"
options: ["a"]
sellingPlansToCreate: [
{
name: "Tous les mois"
options: ["a"]
billingPolicy: {
recurring: {
anchors: { type: MONTHDAY, day: 27, month: null }
interval: MONTH
}
}
deliveryPolicy: {
recurring: {
anchors: { type: MONTHDAY, day: 27, month: null }
interval: MONTH
}
}
pricingPolicies: {
recurring: {
adjustmentType: PERCENTAGE
adjustmentValue: { percentage: 10 }
afterCycle: 0
}
}
}
]
}
resources: { productIds: ["gid://shopify/Product/6700227166344"] }
) {
sellingPlanGroup {
id
sellingPlans(first: 10) {
edges {
node {
id
name
}
}
}
}
userErrors {
code
field
message
}
}
}
`;
When I’m changing the recurring key with a fixed, it’s working but when I’m trying to put both, I got another error.
Thank you.