Fluent Commerce Logo
Docs
Sign In

LJD Test Topic: Getting Started with XYZ

Topic

Changed on:

12 Apr 2024

Overview

Overview Lorem Ipsum...

The Body...

Create a Fluent GraphQL API in Postman

Author:

Fluent Commerce staff

Changed on:

21 June 2024

Key Points

  • Open Postman, click Import, then choose "Upload Files" in the dialog box.
  • Upload the GraphQL SDL File named
    `fluent-graphql.graphql`
    .
  • Confirm settings, including "Include deprecated fields," and click Import; a success message confirms installation in the APIs tab.

Steps

Step arrow right iconPrerequisites

GraphQL SDL file.

Step arrow right iconStep 1. Open Postman and click on the Import button on the top left of the Postman window.

No alt provided

Step arrow right iconStep 2. Click on Upload Files in the dialog box.

No alt provided

Step arrow right iconStep 3. Upload a GraphQL SDL File: fluent-graphql.graphql

No alt provided

Step arrow right iconStep 4. Select both "API name" and "Postman Collection (from GraphQL)", or choose "GraphQL with a Postman Collection", depending on different Postman versions. Click on "Show Import Settings", and make sure to turn on "Include deprecated fields":

No alt providedNo alt provided

Step arrow right iconStep 5. Click on Import button

No alt provided

Step arrow right iconStep 6. Confirmation message is returned

No alt provided

Step arrow right iconStep 7. Navigate to APIs tab (in left-hand corner), the new API is installed successfully

No alt provided

Convert a JSON Introspection result to Schema Definition Language (SDL)

Author:

Fluent Commerce staff

Changed on:

9 Apr 2024

Key Points

  • Converting JSON Introspection to SDL allows for a human-readable format of GraphQL schema, which is essential for documentation and understanding the API structure.
  • Tools such as GraphQL Voyager and Apollo Studio can automate the conversion process, providing a visual representation and SDL output without manual coding.
  • Understanding the structure of the introspection query result is crucial for manually converting the JSON to SDL, should automated tools not be available or suitable.

Steps

Step arrow right iconPrerequisites

  • NodeJS
  • Response file of a JSON Introspection Query.

Step arrow right iconSteps to Follow

  • Open a terminal / command prompt, and run the following command to install the Node package 
    `graphql-introspection-json-to-sdl`
    `npm install -g graphql-introspection-json-to-sdl`
  • Once installed, run the following command to convert a JSON file to GraphQL SDL file.
    `graphql-introspection-json-to-sdl <path-to-instrospection-query-result-json-file> > <path-to-result-sdl-file>`
    Example (from the same direction as the JSON schema file): 
    `graphql-introspection-json-to-sdl fluent-graphql.json > fluent-graphql.graphql`

Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo