Automatically generate Flatfile Space configurations by converting GraphQL schemas into Workbooks and Sheets, streamlining data import setup for GraphQL APIs.
setupFactory
object passed to the configureSpaceGraphQL
function.
Parameter | Type | Required | Description |
---|---|---|---|
workbooks | PartialWorkbookConfig[] | Yes | Array of workbook configuration objects. Each object generates one workbook. |
space | object | No | Configuration for the Space itself (e.g., metadata, themes). |
documents | object[] | No | Array of document configurations to add to the Space. |
Parameter | Type | Default | Description |
---|---|---|---|
source | string | GraphQLSchema | function | Required | GraphQL schema source - can be a URL, SDL string, GraphQLSchema object, or function returning a GraphQLSchema |
sheets | PartialSheetConfig[] | undefined | Optional array to filter and customize generated sheets |
name | string | 'GraphQL Workbook' | User-friendly name for the workbook |
Parameter | Type | Default | Description |
---|---|---|---|
slug | string | Required | Sheet slug that must match a GraphQL object type name |
name | string | capitalCase of GraphQL object name | User-friendly name for the sheet |
source
option points to a valid, publicly accessible GraphQL endpoint that responds to introspection queries.
sheets
filter, verify that the slug
for each sheet configuration exactly matches the name of the corresponding GraphQL object type.
sheets
filter or the filter is omitted entirely).
source
. It creates one sheet for each GraphQL OBJECT
type, excluding standard types like Query
, Mutation
, Subscription
, and internal types (those starting with __
).
Field Type Mapping:
Int
→ number
, String
→ string
)NON_NULL
, a required
constraint is addedSCALAR
, OBJECT
, and NON_NULL
types. Other GraphQL types like LIST
, UNION
, INTERFACE
, and ENUM
are not explicitly supported and will be skipped during sheet generation.
configureSpace
job to fail.