Fluent Commerce Logo
Docs
Sign In

fc.graphql.comment.access

Setting

Changed on:

10 Dec 2024

Setting AreaSystem
Supported context levels:ACCOUNT

Overview

This setting 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 GraphQL Permissions at the Account or Retailer 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`
Setting toggles between the following behavior options:

`retailer`
value

Comments can only be viewed, created, or updated when a querying User has a Role with a corresponding Permission(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 Permission(s).

Both

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

System Defaults

The Comment GraphQL API behavior defaults to the

`retailer`
value when the
`fc.graphql.comment.access`
Setting:

  • 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}

Language: json

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}

Language: json