Fluent Commerce Logo
Docs
Sign In

fc.graphql.comment.access

Setting

Changed on:

10 Dec 2024

Setting AreaSystem
Supported context levels:ACCOUNT

Overview

This is a feature toggle that enables the Retailer-specific Permissions for the Comment GraphQL API.

It allows you to manage User access rights for creating, updating, and viewing Comments with the corresponding Permissions at the or level.

Values

Data TypeValues
STRING

Default Value(s):

  • `retailer`

Possible Values:

  • `retailer`
  • `account`

Detailed technical description

To ensure full backward compatibility, `fc.graphql.comment.access` toggles between the following behavior options:

`retailer` value

Comments can only be viewed, created, or updated when a querying User has a with a corresponding (s):

  • On Retailer-level (`RETAILER` Context) with a specified `retailerId` that matches the one of the Entity associated with the Comment
  • On Account-level (`ACCOUNT` Context)

`account` value

Comments can be viewed, created, or updated by a User with a corresponding (s).

Both `ACCOUNT` and `RETAILER` Contexts work similarly and are considered Account-level Permissions.

System Defaults

The Comment API behavior defaults to the `retailer` value when the `fc.graphql.comment.access` :

  • Is created with the `retailer` value set
  • Is created with an invalid value (corresponds to any value except the `account` and `retailer`)
  • Is not created

Configuration example

1POST {{fluentApiHost}}/graphql
2
3mutation CreateSetting {
4   createSetting(input: {
5		name: "fc.graphql.comment.access", 
6		valueType: "STRING", 
7		value: "retailer", 
8		context: "ACCOUNT", 
9		contextId: 0
10   }) {
11    id
12    name
13  }
14}

Update example

1POST {{fluentApiHost}}/graphql
2
3mutation updateSetting {
4  updateSetting(input: {
5		id: 123,
6		name: "fc.graphql.comment.access", 
7		valueType: "STRING", 
8		value:"account", 
9		context: "ACCOUNT", 
10		contextId: 0
11  }) {
12    id
13    name
14  }
15}