Skip to content

Commit

Permalink
fix(gatsby): add missing built-in types (#33014)
Browse files Browse the repository at this point in the history
* fix: add missing built-in types

* fix tests

* change todo from v5 to v4
  • Loading branch information
vladar authored Sep 1, 2021
1 parent 476a00f commit 66d9243
Show file tree
Hide file tree
Showing 5 changed files with 701 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,44 @@ type SitePage implements Node {
internal: Internal!
}
type SitePlugin implements Node {
resolve: String
name: String
version: String
nodeAPIs: [String]
browserAPIs: [String]
ssrAPIs: [String]
pluginFilepath: String
id: ID!
parent: Node
children: [Node!]!
internal: Internal!
}
type SiteBuildMetadata implements Node {
buildTime(
\\"\\"\\"
Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens.
\\"\\"\\"
formatString: String
\\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\"
fromNow: Boolean
\\"\\"\\"
Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\".
\\"\\"\\"
difference: String
\\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\"
locale: String
): Date
id: ID!
parent: Node
children: [Node!]!
internal: Internal!
}
type Query {
file(sourceInstanceName: StringQueryOperatorInput, absolutePath: StringQueryOperatorInput, relativePath: StringQueryOperatorInput, extension: StringQueryOperatorInput, size: IntQueryOperatorInput, prettySize: StringQueryOperatorInput, modifiedTime: DateQueryOperatorInput, accessTime: DateQueryOperatorInput, changeTime: DateQueryOperatorInput, birthTime: DateQueryOperatorInput, root: StringQueryOperatorInput, dir: StringQueryOperatorInput, base: StringQueryOperatorInput, ext: StringQueryOperatorInput, name: StringQueryOperatorInput, relativeDirectory: StringQueryOperatorInput, dev: IntQueryOperatorInput, mode: IntQueryOperatorInput, nlink: IntQueryOperatorInput, uid: IntQueryOperatorInput, gid: IntQueryOperatorInput, rdev: IntQueryOperatorInput, ino: FloatQueryOperatorInput, atimeMs: FloatQueryOperatorInput, mtimeMs: FloatQueryOperatorInput, ctimeMs: FloatQueryOperatorInput, atime: DateQueryOperatorInput, mtime: DateQueryOperatorInput, ctime: DateQueryOperatorInput, birthtime: DateQueryOperatorInput, birthtimeMs: FloatQueryOperatorInput, id: StringQueryOperatorInput, parent: NodeFilterInput, children: NodeFilterListInput, internal: InternalFilterInput): File
allFile(filter: FileFilterInput, sort: FileSortInput, skip: Int, limit: Int): FileConnection!
Expand All @@ -438,6 +476,10 @@ type Query {
allSiteFunction(filter: SiteFunctionFilterInput, sort: SiteFunctionSortInput, skip: Int, limit: Int): SiteFunctionConnection!
sitePage(path: StringQueryOperatorInput, component: StringQueryOperatorInput, internalComponentName: StringQueryOperatorInput, componentChunkName: StringQueryOperatorInput, matchPath: StringQueryOperatorInput, id: StringQueryOperatorInput, parent: NodeFilterInput, children: NodeFilterListInput, internal: InternalFilterInput): SitePage
allSitePage(filter: SitePageFilterInput, sort: SitePageSortInput, skip: Int, limit: Int): SitePageConnection!
sitePlugin(resolve: StringQueryOperatorInput, name: StringQueryOperatorInput, version: StringQueryOperatorInput, nodeAPIs: StringQueryOperatorInput, browserAPIs: StringQueryOperatorInput, ssrAPIs: StringQueryOperatorInput, pluginFilepath: StringQueryOperatorInput, id: StringQueryOperatorInput, parent: NodeFilterInput, children: NodeFilterListInput, internal: InternalFilterInput): SitePlugin
allSitePlugin(filter: SitePluginFilterInput, sort: SitePluginSortInput, skip: Int, limit: Int): SitePluginConnection!
siteBuildMetadata(buildTime: DateQueryOperatorInput, id: StringQueryOperatorInput, parent: NodeFilterInput, children: NodeFilterListInput, internal: InternalFilterInput): SiteBuildMetadata
allSiteBuildMetadata(filter: SiteBuildMetadataFilterInput, sort: SiteBuildMetadataSortInput, skip: Int, limit: Int): SiteBuildMetadataConnection!
}
input StringQueryOperatorInput {
Expand Down Expand Up @@ -1323,5 +1365,277 @@ input SitePageSortInput {
fields: [SitePageFieldsEnum]
order: [SortOrderEnum] = [ASC]
}
type SitePluginConnection {
totalCount: Int!
edges: [SitePluginEdge!]!
nodes: [SitePlugin!]!
pageInfo: PageInfo!
distinct(field: SitePluginFieldsEnum!): [String!]!
max(field: SitePluginFieldsEnum!): Float
min(field: SitePluginFieldsEnum!): Float
sum(field: SitePluginFieldsEnum!): Float
group(skip: Int, limit: Int, field: SitePluginFieldsEnum!): [SitePluginGroupConnection!]!
}
type SitePluginEdge {
next: SitePlugin
node: SitePlugin!
previous: SitePlugin
}
enum SitePluginFieldsEnum {
resolve
name
version
nodeAPIs
browserAPIs
ssrAPIs
pluginFilepath
id
parent___id
parent___parent___id
parent___parent___parent___id
parent___parent___parent___children
parent___parent___children
parent___parent___children___id
parent___parent___children___children
parent___parent___internal___content
parent___parent___internal___contentDigest
parent___parent___internal___description
parent___parent___internal___fieldOwners
parent___parent___internal___ignoreType
parent___parent___internal___mediaType
parent___parent___internal___owner
parent___parent___internal___type
parent___children
parent___children___id
parent___children___parent___id
parent___children___parent___children
parent___children___children
parent___children___children___id
parent___children___children___children
parent___children___internal___content
parent___children___internal___contentDigest
parent___children___internal___description
parent___children___internal___fieldOwners
parent___children___internal___ignoreType
parent___children___internal___mediaType
parent___children___internal___owner
parent___children___internal___type
parent___internal___content
parent___internal___contentDigest
parent___internal___description
parent___internal___fieldOwners
parent___internal___ignoreType
parent___internal___mediaType
parent___internal___owner
parent___internal___type
children
children___id
children___parent___id
children___parent___parent___id
children___parent___parent___children
children___parent___children
children___parent___children___id
children___parent___children___children
children___parent___internal___content
children___parent___internal___contentDigest
children___parent___internal___description
children___parent___internal___fieldOwners
children___parent___internal___ignoreType
children___parent___internal___mediaType
children___parent___internal___owner
children___parent___internal___type
children___children
children___children___id
children___children___parent___id
children___children___parent___children
children___children___children
children___children___children___id
children___children___children___children
children___children___internal___content
children___children___internal___contentDigest
children___children___internal___description
children___children___internal___fieldOwners
children___children___internal___ignoreType
children___children___internal___mediaType
children___children___internal___owner
children___children___internal___type
children___internal___content
children___internal___contentDigest
children___internal___description
children___internal___fieldOwners
children___internal___ignoreType
children___internal___mediaType
children___internal___owner
children___internal___type
internal___content
internal___contentDigest
internal___description
internal___fieldOwners
internal___ignoreType
internal___mediaType
internal___owner
internal___type
}
type SitePluginGroupConnection {
totalCount: Int!
edges: [SitePluginEdge!]!
nodes: [SitePlugin!]!
pageInfo: PageInfo!
field: String!
fieldValue: String
}
input SitePluginFilterInput {
resolve: StringQueryOperatorInput
name: StringQueryOperatorInput
version: StringQueryOperatorInput
nodeAPIs: StringQueryOperatorInput
browserAPIs: StringQueryOperatorInput
ssrAPIs: StringQueryOperatorInput
pluginFilepath: StringQueryOperatorInput
id: StringQueryOperatorInput
parent: NodeFilterInput
children: NodeFilterListInput
internal: InternalFilterInput
}
input SitePluginSortInput {
fields: [SitePluginFieldsEnum]
order: [SortOrderEnum] = [ASC]
}
type SiteBuildMetadataConnection {
totalCount: Int!
edges: [SiteBuildMetadataEdge!]!
nodes: [SiteBuildMetadata!]!
pageInfo: PageInfo!
distinct(field: SiteBuildMetadataFieldsEnum!): [String!]!
max(field: SiteBuildMetadataFieldsEnum!): Float
min(field: SiteBuildMetadataFieldsEnum!): Float
sum(field: SiteBuildMetadataFieldsEnum!): Float
group(skip: Int, limit: Int, field: SiteBuildMetadataFieldsEnum!): [SiteBuildMetadataGroupConnection!]!
}
type SiteBuildMetadataEdge {
next: SiteBuildMetadata
node: SiteBuildMetadata!
previous: SiteBuildMetadata
}
enum SiteBuildMetadataFieldsEnum {
buildTime
id
parent___id
parent___parent___id
parent___parent___parent___id
parent___parent___parent___children
parent___parent___children
parent___parent___children___id
parent___parent___children___children
parent___parent___internal___content
parent___parent___internal___contentDigest
parent___parent___internal___description
parent___parent___internal___fieldOwners
parent___parent___internal___ignoreType
parent___parent___internal___mediaType
parent___parent___internal___owner
parent___parent___internal___type
parent___children
parent___children___id
parent___children___parent___id
parent___children___parent___children
parent___children___children
parent___children___children___id
parent___children___children___children
parent___children___internal___content
parent___children___internal___contentDigest
parent___children___internal___description
parent___children___internal___fieldOwners
parent___children___internal___ignoreType
parent___children___internal___mediaType
parent___children___internal___owner
parent___children___internal___type
parent___internal___content
parent___internal___contentDigest
parent___internal___description
parent___internal___fieldOwners
parent___internal___ignoreType
parent___internal___mediaType
parent___internal___owner
parent___internal___type
children
children___id
children___parent___id
children___parent___parent___id
children___parent___parent___children
children___parent___children
children___parent___children___id
children___parent___children___children
children___parent___internal___content
children___parent___internal___contentDigest
children___parent___internal___description
children___parent___internal___fieldOwners
children___parent___internal___ignoreType
children___parent___internal___mediaType
children___parent___internal___owner
children___parent___internal___type
children___children
children___children___id
children___children___parent___id
children___children___parent___children
children___children___children
children___children___children___id
children___children___children___children
children___children___internal___content
children___children___internal___contentDigest
children___children___internal___description
children___children___internal___fieldOwners
children___children___internal___ignoreType
children___children___internal___mediaType
children___children___internal___owner
children___children___internal___type
children___internal___content
children___internal___contentDigest
children___internal___description
children___internal___fieldOwners
children___internal___ignoreType
children___internal___mediaType
children___internal___owner
children___internal___type
internal___content
internal___contentDigest
internal___description
internal___fieldOwners
internal___ignoreType
internal___mediaType
internal___owner
internal___type
}
type SiteBuildMetadataGroupConnection {
totalCount: Int!
edges: [SiteBuildMetadataEdge!]!
nodes: [SiteBuildMetadata!]!
pageInfo: PageInfo!
field: String!
fieldValue: String
}
input SiteBuildMetadataFilterInput {
buildTime: DateQueryOperatorInput
id: StringQueryOperatorInput
parent: NodeFilterInput
children: NodeFilterListInput
internal: InternalFilterInput
}
input SiteBuildMetadataSortInput {
fields: [SiteBuildMetadataFieldsEnum]
order: [SortOrderEnum] = [ASC]
}
"
`;
42 changes: 42 additions & 0 deletions packages/gatsby/src/schema/__tests__/__snapshots__/print.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,20 @@ type SitePage implements Node @dontInfer {
matchPath: String
}
type SitePlugin implements Node @dontInfer {
resolve: String
name: String
version: String
nodeAPIs: [String]
browserAPIs: [String]
ssrAPIs: [String]
pluginFilepath: String
}
type SiteBuildMetadata implements Node @dontInfer {
buildTime: Date @dateformat
}
type Inline {
foo: Nested
}
Expand Down Expand Up @@ -272,6 +286,20 @@ type SitePage implements Node @dontInfer {
matchPath: String
}
type SitePlugin implements Node @dontInfer {
resolve: String
name: String
version: String
nodeAPIs: [String]
browserAPIs: [String]
ssrAPIs: [String]
pluginFilepath: String
}
type SiteBuildMetadata implements Node @dontInfer {
buildTime: Date @dateformat
}
type AnotherTest implements Node & ITest @dontInfer {
nested: Nested
date: Date @dateformat(formatString: \\"YYYY\\")
Expand Down Expand Up @@ -447,6 +475,20 @@ type SitePage implements Node @dontInfer {
matchPath: String
}
type SitePlugin implements Node @dontInfer {
resolve: String
name: String
version: String
nodeAPIs: [String]
browserAPIs: [String]
ssrAPIs: [String]
pluginFilepath: String
}
type SiteBuildMetadata implements Node @dontInfer {
buildTime: Date @dateformat
}
type AnotherTest implements Node & ITest @dontInfer {
nested: Nested
date: Date @dateformat(formatString: \\"YYYY\\")
Expand Down
Loading

0 comments on commit 66d9243

Please sign in to comment.