The newFile() GraphQL mutation may be used to create a new file.

For information on loading and using files, see the Lookup Files documentation page.


Below is the syntax for the newFile() mutation field:

newFile(fileName: string!, name: string!): UploadedFileSnapshot!

Returned Datatypes

The returned datatype UploadedFileSnapshot has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: UploadedFileSnapshot

nameAndPathFileNameAndPathyes The name and path of the uploaded snapshot file (see FileNameAndPath Table).
headers[string]yes List of headers for the uploaded snapshot file.
lines[string]yes The contents of the file in the form of a list of lines, with each line being itself a list of column values.
totalLinesCountlongyes The total number of lines in the uploaded snapshot file.
limitintegeryes The file upload limit.
offsetintegeryes For the


query, this is the offset supplied to that query. For the




mutations, this is always 0.
filterStringstring  Any string on which to filter the data.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.