You are here

public function WSConnectorGraphQL::getReplacements in Web Service Data 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/WSConnector/WSConnectorGraphQL.php \Drupal\wsdata\Plugin\WSConnector\WSConnectorGraphQL::getReplacements()

Return an array of replacements.

Overrides WSConnectorSimpleHTTP::getReplacements

File

src/Plugin/WSConnector/WSConnectorGraphQL.php, line 76

Class

WSConnectorGraphQL
HTTP Connector.

Namespace

Drupal\wsdata\Plugin\WSConnector

Code

public function getReplacements(array $options) {
  $replacements = array_unique($this
    ->findTokens($this->endpoint . '/' . $options['path']) + $this
    ->findTokens($options['query']) + $this
    ->findTokens(json_encode($options['variables'])));
  unset($replacements[array_search('LANGUAGE', $replacements)]);
  return $replacements;
}