diff --git a/.tina/__generated__/_graphql.json b/.tina/__generated__/_graphql.json index f0770072c..bf2960573 100644 --- a/.tina/__generated__/_graphql.json +++ b/.tina/__generated__/_graphql.json @@ -1,1916 +1 @@ -{ - "kind": "Document", - "definitions": [ - { - "kind": "ScalarTypeDefinition", - "name": { - "kind": "Name", - "value": "Reference" - }, - "description": { - "kind": "StringValue", - "value": "References another document, used as a foreign key" - }, - "directives": [] - }, - { - "kind": "ScalarTypeDefinition", - "name": { - "kind": "Name", - "value": "JSON" - }, - "description": { - "kind": "StringValue", - "value": "" - }, - "directives": [] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "SystemInfo" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "filename" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "basename" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "breadcrumbs" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "excludeExtension" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "path" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "extension" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "template" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "collection" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Collection" - } - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "PageInfo" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "hasPreviousPage" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "hasNextPage" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "startCursor" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "endCursor" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - } - ] - }, - { - "kind": "InterfaceTypeDefinition", - "description": { - "kind": "StringValue", - "value": "" - }, - "name": { - "kind": "Name", - "value": "Node" - }, - "interfaces": [], - "directives": [], - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "ID" - } - } - } - } - ] - }, - { - "kind": "InterfaceTypeDefinition", - "description": { - "kind": "StringValue", - "value": "" - }, - "name": { - "kind": "Name", - "value": "Document" - }, - "interfaces": [], - "directives": [], - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "sys" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "SystemInfo" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "ID" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "form" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "values" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - } - ] - }, - { - "kind": "InterfaceTypeDefinition", - "description": { - "kind": "StringValue", - "value": "A relay-compliant pagination connection" - }, - "name": { - "kind": "Name", - "value": "Connection" - }, - "interfaces": [], - "directives": [], - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "totalCount" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "Query" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getCollection" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "collection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Collection" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getCollections" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Collection" - } - } - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "node" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Node" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "collection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentNode" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getDocumentList" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "before" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "after" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "first" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "last" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentConnection" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getDocumentFields" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getPostsDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsDocument" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getPostsList" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "before" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "after" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "first" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "last" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsConnection" - } - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "DocumentConnectionEdges" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "cursor" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "node" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentNode" - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [ - { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Connection" - } - } - ], - "directives": [], - "name": { - "kind": "Name", - "value": "DocumentConnection" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "pageInfo" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PageInfo" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "totalCount" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "edges" - }, - "arguments": [], - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentConnectionEdges" - } - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "Collection" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "name" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "slug" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "label" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "path" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "format" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "matches" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "templates" - }, - "arguments": [], - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "fields" - }, - "arguments": [], - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "documents" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "before" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "after" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "first" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "last" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentConnection" - } - } - } - } - ] - }, - { - "kind": "UnionTypeDefinition", - "name": { - "kind": "Name", - "value": "DocumentNode" - }, - "directives": [], - "types": [ - { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsDocument" - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "Posts" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "title" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "description" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "date" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "tags" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "imageUrl" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "body" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [ - { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Node" - } - }, - { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Document" - } - } - ], - "directives": [], - "name": { - "kind": "Name", - "value": "PostsDocument" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "ID" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "sys" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "SystemInfo" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "data" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Posts" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "form" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "values" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "dataJSON" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "PostsConnectionEdges" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "cursor" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "node" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsDocument" - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [ - { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Connection" - } - } - ], - "directives": [], - "name": { - "kind": "Name", - "value": "PostsConnection" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "pageInfo" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PageInfo" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "totalCount" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "edges" - }, - "arguments": [], - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsConnectionEdges" - } - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "Mutation" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "addPendingDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "collection" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "template" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentNode" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "updateDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "collection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "params" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentMutation" - } - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentNode" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "createDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "collection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "params" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentMutation" - } - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentNode" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "updatePostsDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "params" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsMutation" - } - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsDocument" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "createPostsDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "params" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsMutation" - } - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsDocument" - } - } - } - } - ] - }, - { - "kind": "InputObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "DocumentMutation" - }, - "fields": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "posts" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsMutation" - } - } - } - ] - }, - { - "kind": "InputObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "PostsMutation" - }, - "fields": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "title" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "description" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "date" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tags" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "imageUrl" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "body" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - ] - } - ] -} \ No newline at end of file +{"kind":"Document","definitions":[{"kind":"ScalarTypeDefinition","name":{"kind":"Name","value":"Reference"},"description":{"kind":"StringValue","value":"References another document, used as a foreign key"},"directives":[]},{"kind":"ScalarTypeDefinition","name":{"kind":"Name","value":"JSON"},"description":{"kind":"StringValue","value":""},"directives":[]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"SystemInfo"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"filename"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"title"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"basename"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"hasReferences"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"breadcrumbs"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"excludeExtension"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"path"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"relativePath"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"extension"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"template"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"collection"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Collection"}}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"Folder"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"name"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"path"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"PageInfo"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"hasPreviousPage"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"hasNextPage"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"startCursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"endCursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}]},{"kind":"InterfaceTypeDefinition","description":{"kind":"StringValue","value":""},"name":{"kind":"Name","value":"Node"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"id"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}]},{"kind":"InterfaceTypeDefinition","description":{"kind":"StringValue","value":""},"name":{"kind":"Name","value":"Document"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"id"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"_sys"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"SystemInfo"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"_values"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}}]},{"kind":"InterfaceTypeDefinition","description":{"kind":"StringValue","value":"A relay-compliant pagination connection"},"name":{"kind":"Name","value":"Connection"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"totalCount"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"pageInfo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PageInfo"}}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"Query"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"getOptimizedQuery"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"queryString"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"collection"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Collection"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"collections"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Collection"}}}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"node"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"id"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Node"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"document"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"posts"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Posts"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"postsConnection"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"before"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"first"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"last"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"sort"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"filter"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostsFilter"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PostsConnection"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"DocumentFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"posts"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostsFilter"}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"DocumentConnectionEdges"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"cursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"node"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}]},{"kind":"ObjectTypeDefinition","interfaces":[{"kind":"NamedType","name":{"kind":"Name","value":"Connection"}}],"directives":[],"name":{"kind":"Name","value":"DocumentConnection"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"pageInfo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PageInfo"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"totalCount"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"edges"},"arguments":[],"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentConnectionEdges"}}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"Collection"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"name"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"slug"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"label"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"path"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"format"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"matches"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"templates"},"arguments":[],"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"fields"},"arguments":[],"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"documents"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"before"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"first"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"last"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"sort"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"filter"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"folder"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentConnection"}}}}]},{"kind":"UnionTypeDefinition","name":{"kind":"Name","value":"DocumentNode"},"directives":[],"types":[{"kind":"NamedType","name":{"kind":"Name","value":"Posts"}},{"kind":"NamedType","name":{"kind":"Name","value":"Folder"}}]},{"kind":"ObjectTypeDefinition","interfaces":[{"kind":"NamedType","name":{"kind":"Name","value":"Node"}},{"kind":"NamedType","name":{"kind":"Name","value":"Document"}}],"directives":[],"name":{"kind":"Name","value":"Posts"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"title"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"description"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"date"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"tags"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"imageUrl"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"body"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"id"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"_sys"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SystemInfo"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"_values"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"StringFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"startsWith"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"eq"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"exists"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"in"},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"ImageFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"startsWith"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"eq"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"exists"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"in"},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"PostsBodyQuoteFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"content"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"author"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"cite"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"PostsBodyArticleImageFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"src"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"caption"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"BooleanFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"eq"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"exists"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"PostsBodyCodeFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"code"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"language"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"selectedLines"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"withCopyButton"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"BooleanFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"withLineNumbers"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"BooleanFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"caption"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"PostsBodyFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"Quote"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostsBodyQuoteFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"ArticleImage"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostsBodyArticleImageFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"Code"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostsBodyCodeFilter"}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"PostsFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"title"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"description"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"date"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"tags"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"imageUrl"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ImageFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"body"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostsBodyFilter"}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"PostsConnectionEdges"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"cursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"node"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"Posts"}}}]},{"kind":"ObjectTypeDefinition","interfaces":[{"kind":"NamedType","name":{"kind":"Name","value":"Connection"}}],"directives":[],"name":{"kind":"Name","value":"PostsConnection"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"pageInfo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PageInfo"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"totalCount"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"edges"},"arguments":[],"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PostsConnectionEdges"}}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"Mutation"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"addPendingDocument"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"template"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"updateDocument"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"params"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentUpdateMutation"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"deleteDocument"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"createDocument"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"params"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentMutation"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"createFolder"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"updatePosts"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"params"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PostsMutation"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Posts"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"createPosts"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"params"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PostsMutation"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Posts"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"DocumentUpdateMutation"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"posts"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostsMutation"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"DocumentMutation"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"posts"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostsMutation"}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"PostsMutation"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"title"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"description"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"date"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"tags"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"imageUrl"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"body"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}]}]} \ No newline at end of file diff --git a/.tina/__generated__/_lookup.json b/.tina/__generated__/_lookup.json index 53ab1495c..a12160ad7 100644 --- a/.tina/__generated__/_lookup.json +++ b/.tina/__generated__/_lookup.json @@ -1,31 +1 @@ -{ - "DocumentConnection": { - "type": "DocumentConnection", - "resolveType": "multiCollectionDocumentList", - "collections": [ - "posts" - ] - }, - "Node": { - "type": "Node", - "resolveType": "nodeDocument" - }, - "DocumentNode": { - "type": "DocumentNode", - "resolveType": "multiCollectionDocument", - "createDocument": "create", - "updateDocument": "update" - }, - "PostsDocument": { - "type": "PostsDocument", - "resolveType": "collectionDocument", - "collection": "posts", - "createPostsDocument": "create", - "updatePostsDocument": "update" - }, - "PostsConnection": { - "type": "PostsConnection", - "resolveType": "collectionDocumentList", - "collection": "posts" - } -} \ No newline at end of file +{"DocumentConnection":{"type":"DocumentConnection","resolveType":"multiCollectionDocumentList","collections":["posts"]},"Node":{"type":"Node","resolveType":"nodeDocument"},"DocumentNode":{"type":"DocumentNode","resolveType":"multiCollectionDocument","createDocument":"create","updateDocument":"update"},"Posts":{"type":"Posts","resolveType":"collectionDocument","collection":"posts","createPosts":"create","updatePosts":"update"},"PostsConnection":{"type":"PostsConnection","resolveType":"collectionDocumentList","collection":"posts"}} \ No newline at end of file diff --git a/.tina/__generated__/_schema.json b/.tina/__generated__/_schema.json index a29551317..d41aad6db 100644 --- a/.tina/__generated__/_schema.json +++ b/.tina/__generated__/_schema.json @@ -1,276 +1 @@ -{ - "version": { - "fullVersion": "0.59.3", - "major": "0", - "minor": "59", - "patch": "3" - }, - "meta": {}, - "collections": [ - { - "label": "Blog Posts", - "name": "posts", - "path": "posts", - "fields": [ - { - "type": "string", - "label": "Title", - "name": "title", - "namespace": [ - "posts", - "title" - ] - }, - { - "type": "string", - "label": "Description", - "name": "description", - "namespace": [ - "posts", - "description" - ] - }, - { - "type": "string", - "label": "Date", - "name": "date", - "namespace": [ - "posts", - "date" - ] - }, - { - "type": "string", - "label": "Tags", - "name": "tags", - "namespace": [ - "posts", - "tags" - ] - }, - { - "type": "string", - "label": "Image URL", - "name": "imageUrl", - "namespace": [ - "posts", - "imageUrl" - ] - }, - { - "type": "rich-text", - "label": "Blog Post Body", - "name": "body", - "isBody": true, - "templates": [ - { - "name": "Quote", - "label": "Quote", - "fields": [ - { - "type": "string", - "name": "content", - "label": "Content", - "namespace": [ - "posts", - "body", - "Quote", - "content" - ] - }, - { - "type": "string", - "name": "author", - "label": "Author", - "namespace": [ - "posts", - "body", - "Quote", - "author" - ] - }, - { - "type": "string", - "name": "cite", - "label": "Cite", - "namespace": [ - "posts", - "body", - "Quote", - "cite" - ] - } - ], - "namespace": [ - "posts", - "body", - "Quote" - ] - }, - { - "name": "ArticleImage", - "label": "ArticleImage", - "fields": [ - { - "type": "string", - "name": "src", - "label": "Src", - "namespace": [ - "posts", - "body", - "ArticleImage", - "src" - ] - }, - { - "type": "string", - "name": "caption", - "label": "Caption", - "namespace": [ - "posts", - "body", - "ArticleImage", - "caption" - ] - } - ], - "namespace": [ - "posts", - "body", - "ArticleImage" - ] - }, - { - "name": "Code", - "label": "Code", - "fields": [ - { - "type": "string", - "name": "code", - "label": "Code", - "namespace": [ - "posts", - "body", - "Code", - "code" - ] - }, - { - "type": "string", - "name": "language", - "label": "Language", - "namespace": [ - "posts", - "body", - "Code", - "language" - ] - }, - { - "type": "string", - "name": "selectedLines", - "label": "Selected Lines", - "namespace": [ - "posts", - "body", - "Code", - "selectedLines" - ] - }, - { - "type": "boolean", - "name": "withCopyButton", - "label": "With Copy Button", - "namespace": [ - "posts", - "body", - "Code", - "withCopyButton" - ] - }, - { - "type": "boolean", - "name": "withLineNumbers", - "label": "With Line Numbers", - "namespace": [ - "posts", - "body", - "Code", - "withLineNumbers" - ] - }, - { - "type": "string", - "name": "caption", - "label": "Caption", - "namespace": [ - "posts", - "body", - "Code", - "caption" - ] - } - ], - "namespace": [ - "posts", - "body", - "Code" - ] - }, - { - "name": "h2", - "label": "H2", - "inline": true, - "fields": [], - "namespace": [ - "posts", - "body", - "h2" - ] - }, - { - "name": "h3", - "label": "H3", - "inline": true, - "fields": [], - "namespace": [ - "posts", - "body", - "h3" - ] - }, - { - "name": "br", - "label": "BR", - "inline": true, - "fields": [], - "namespace": [ - "posts", - "body", - "br" - ] - }, - { - "name": "p", - "label": "P", - "inline": true, - "fields": [], - "namespace": [ - "posts", - "body", - "p" - ] - } - ], - "namespace": [ - "posts", - "body" - ] - } - ], - "namespace": [ - "posts" - ] - } - ] -} \ No newline at end of file +{"version":{"fullVersion":"1.5.9","major":"1","minor":"5","patch":"9"},"meta":{"flags":["experimentalData"]},"collections":[{"label":"Blog Posts","name":"posts","path":"posts","format":"mdx","fields":[{"type":"string","label":"Title","name":"title","namespace":["posts","title"],"searchable":true,"uid":false},{"type":"string","label":"Description","name":"description","namespace":["posts","description"],"searchable":true,"uid":false},{"type":"string","label":"Date","name":"date","namespace":["posts","date"],"searchable":true,"uid":false},{"type":"string","label":"Tags","name":"tags","namespace":["posts","tags"],"searchable":true,"uid":false},{"type":"image","label":"Image URL","name":"imageUrl","namespace":["posts","imageUrl"],"searchable":false,"uid":false},{"type":"rich-text","label":"Blog Post Body","name":"body","isBody":true,"templates":[{"name":"Quote","label":"Quote","fields":[{"type":"string","name":"content","label":"Content","namespace":["posts","body","Quote","content"],"searchable":true,"uid":false},{"type":"string","name":"author","label":"Author","namespace":["posts","body","Quote","author"],"searchable":true,"uid":false},{"type":"string","name":"cite","label":"Cite","namespace":["posts","body","Quote","cite"],"searchable":true,"uid":false}],"namespace":["posts","body","Quote"]},{"name":"ArticleImage","label":"ArticleImage","fields":[{"type":"string","name":"src","label":"Src","namespace":["posts","body","ArticleImage","src"],"searchable":true,"uid":false},{"type":"string","name":"caption","label":"Caption","namespace":["posts","body","ArticleImage","caption"],"searchable":true,"uid":false}],"namespace":["posts","body","ArticleImage"]},{"name":"Code","label":"Code","fields":[{"type":"string","name":"code","label":"Code","namespace":["posts","body","Code","code"],"searchable":true,"uid":false},{"type":"string","name":"language","label":"Language","namespace":["posts","body","Code","language"],"searchable":true,"uid":false},{"type":"string","name":"selectedLines","label":"Selected Lines","namespace":["posts","body","Code","selectedLines"],"searchable":true,"uid":false},{"type":"boolean","name":"withCopyButton","label":"With Copy Button","namespace":["posts","body","Code","withCopyButton"],"searchable":true,"uid":false},{"type":"boolean","name":"withLineNumbers","label":"With Line Numbers","namespace":["posts","body","Code","withLineNumbers"],"searchable":true,"uid":false},{"type":"string","name":"caption","label":"Caption","namespace":["posts","body","Code","caption"],"searchable":true,"uid":false}],"namespace":["posts","body","Code"]}],"namespace":["posts","body"],"searchable":true,"parser":{"type":"mdx"},"uid":false}],"namespace":["posts"]}],"config":{"media":{"tina":{"publicFolder":"public","mediaRoot":""}}}} \ No newline at end of file diff --git a/.tina/__generated__/frags.gql b/.tina/__generated__/frags.gql index 595ff5003..d9fa14fb6 100644 --- a/.tina/__generated__/frags.gql +++ b/.tina/__generated__/frags.gql @@ -1,4 +1,5 @@ fragment PostsParts on Posts { + __typename title description date diff --git a/.tina/__generated__/queries.gql b/.tina/__generated__/queries.gql index 949e4040d..cfbc870db 100644 --- a/.tina/__generated__/queries.gql +++ b/.tina/__generated__/queries.gql @@ -1,37 +1,53 @@ -query getPostsDocument($relativePath: String!) { - getPostsDocument(relativePath: $relativePath) { - sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - id - data { - ...PostsParts +query posts($relativePath: String!) { + posts(relativePath: $relativePath) { + ... on Document { + _sys { + filename + basename + hasReferences + breadcrumbs + path + relativePath + extension + } + id } + ...PostsParts } } -query getPostsList { - getPostsList { +query postsConnection($before: String, $after: String, $first: Float, $last: Float, $sort: String, $filter: PostsFilter) { + postsConnection( + before: $before + after: $after + first: $first + last: $last + sort: $sort + filter: $filter + ) { + pageInfo { + hasPreviousPage + hasNextPage + startCursor + endCursor + } totalCount edges { + cursor node { - id - sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - data { - ...PostsParts + ... on Document { + _sys { + filename + basename + hasReferences + breadcrumbs + path + relativePath + extension + } + id } + ...PostsParts } } } diff --git a/.tina/__generated__/schema.gql b/.tina/__generated__/schema.gql index c7b1d6307..9b47a3a61 100644 --- a/.tina/__generated__/schema.gql +++ b/.tina/__generated__/schema.gql @@ -7,7 +7,9 @@ scalar JSON type SystemInfo { filename: String! + title: String basename: String! + hasReferences: Boolean breadcrumbs(excludeExtension: Boolean): [String!]! path: String! relativePath: String! @@ -16,6 +18,11 @@ type SystemInfo { collection: Collection! } +type Folder { + name: String! + path: String! +} + type PageInfo { hasPreviousPage: Boolean! hasNextPage: Boolean! @@ -30,36 +37,39 @@ interface Node { """""" interface Document { - sys: SystemInfo id: ID! - form: JSON! - values: JSON! + _sys: SystemInfo + _values: JSON! } """A relay-compliant pagination connection""" interface Connection { - totalCount: Int! + totalCount: Float! + pageInfo: PageInfo! } type Query { - getCollection(collection: String): Collection! - getCollections: [Collection!]! + getOptimizedQuery(queryString: String!): String + collection(collection: String): Collection! + collections: [Collection!]! node(id: String): Node! - getDocument(collection: String, relativePath: String): DocumentNode! - getDocumentList(before: String, after: String, first: Int, last: Int): DocumentConnection! - getDocumentFields: JSON! - getPostsDocument(relativePath: String): PostsDocument! - getPostsList(before: String, after: String, first: Int, last: Int): PostsConnection! + document(collection: String, relativePath: String): DocumentNode! + posts(relativePath: String): Posts! + postsConnection(before: String, after: String, first: Float, last: Float, sort: String, filter: PostsFilter): PostsConnection! +} + +input DocumentFilter { + posts: PostsFilter } type DocumentConnectionEdges { - cursor: String + cursor: String! node: DocumentNode } type DocumentConnection implements Connection { - pageInfo: PageInfo - totalCount: Int! + pageInfo: PageInfo! + totalCount: Float! edges: [DocumentConnectionEdges] } @@ -72,46 +82,101 @@ type Collection { matches: String templates: [JSON] fields: [JSON] - documents(before: String, after: String, first: Int, last: Int): DocumentConnection! + documents(before: String, after: String, first: Float, last: Float, sort: String, filter: DocumentFilter, folder: String): DocumentConnection! } -union DocumentNode = PostsDocument +union DocumentNode = Posts | Folder -type Posts { +type Posts implements Node & Document { title: String description: String date: String tags: String imageUrl: String body: JSON + id: ID! + _sys: SystemInfo! + _values: JSON! } -type PostsDocument implements Node & Document { - id: ID! - sys: SystemInfo! - data: Posts! - form: JSON! - values: JSON! - dataJSON: JSON! +input StringFilter { + startsWith: String + eq: String + exists: Boolean + in: [String] +} + +input ImageFilter { + startsWith: String + eq: String + exists: Boolean + in: [String] +} + +input PostsBodyQuoteFilter { + content: StringFilter + author: StringFilter + cite: StringFilter +} + +input PostsBodyArticleImageFilter { + src: StringFilter + caption: StringFilter +} + +input BooleanFilter { + eq: Boolean + exists: Boolean +} + +input PostsBodyCodeFilter { + code: StringFilter + language: StringFilter + selectedLines: StringFilter + withCopyButton: BooleanFilter + withLineNumbers: BooleanFilter + caption: StringFilter +} + +input PostsBodyFilter { + Quote: PostsBodyQuoteFilter + ArticleImage: PostsBodyArticleImageFilter + Code: PostsBodyCodeFilter +} + +input PostsFilter { + title: StringFilter + description: StringFilter + date: StringFilter + tags: StringFilter + imageUrl: ImageFilter + body: PostsBodyFilter } type PostsConnectionEdges { - cursor: String - node: PostsDocument + cursor: String! + node: Posts } type PostsConnection implements Connection { - pageInfo: PageInfo - totalCount: Int! + pageInfo: PageInfo! + totalCount: Float! edges: [PostsConnectionEdges] } type Mutation { addPendingDocument(collection: String!, relativePath: String!, template: String): DocumentNode! - updateDocument(collection: String, relativePath: String!, params: DocumentMutation!): DocumentNode! + updateDocument(collection: String, relativePath: String!, params: DocumentUpdateMutation!): DocumentNode! + deleteDocument(collection: String, relativePath: String!): DocumentNode! createDocument(collection: String, relativePath: String!, params: DocumentMutation!): DocumentNode! - updatePostsDocument(relativePath: String!, params: PostsMutation!): PostsDocument! - createPostsDocument(relativePath: String!, params: PostsMutation!): PostsDocument! + createFolder(collection: String, relativePath: String!): DocumentNode! + updatePosts(relativePath: String!, params: PostsMutation!): Posts! + createPosts(relativePath: String!, params: PostsMutation!): Posts! +} + +input DocumentUpdateMutation { + posts: PostsMutation + relativePath: String } input DocumentMutation { @@ -131,4 +196,3 @@ schema { query: Query mutation: Mutation } - \ No newline at end of file diff --git a/.tina/__generated__/types.ts b/.tina/__generated__/types.ts index c2ff7e84a..e07bbe65c 100644 --- a/.tina/__generated__/types.ts +++ b/.tina/__generated__/types.ts @@ -1,179 +1,247 @@ //@ts-nocheck -// DO NOT MODIFY THIS FILE. This file is automatically generated by Tina -import { gql } from 'tinacms'; -export type Maybe = T | null; + // DO NOT MODIFY THIS FILE. This file is automatically generated by Tina + export function gql(strings: TemplateStringsArray, ...args: string[]): string { + let str = '' + strings.forEach((string, i) => { + str += string + (args[i] || '') + }) + return str + } + export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } /** References another document, used as a foreign key */ - Reference: any; - JSON: any; + Reference: { input: any; output: any; } + JSON: { input: any; output: any; } }; export type SystemInfo = { __typename?: 'SystemInfo'; - filename: Scalars['String']; - basename: Scalars['String']; - breadcrumbs: Array; - path: Scalars['String']; - relativePath: Scalars['String']; - extension: Scalars['String']; - template: Scalars['String']; + filename: Scalars['String']['output']; + title?: Maybe; + basename: Scalars['String']['output']; + hasReferences?: Maybe; + breadcrumbs: Array; + path: Scalars['String']['output']; + relativePath: Scalars['String']['output']; + extension: Scalars['String']['output']; + template: Scalars['String']['output']; collection: Collection; }; export type SystemInfoBreadcrumbsArgs = { - excludeExtension?: InputMaybe; + excludeExtension?: InputMaybe; +}; + +export type Folder = { + __typename?: 'Folder'; + name: Scalars['String']['output']; + path: Scalars['String']['output']; }; export type PageInfo = { __typename?: 'PageInfo'; - hasPreviousPage: Scalars['Boolean']; - hasNextPage: Scalars['Boolean']; - startCursor: Scalars['String']; - endCursor: Scalars['String']; + hasPreviousPage: Scalars['Boolean']['output']; + hasNextPage: Scalars['Boolean']['output']; + startCursor: Scalars['String']['output']; + endCursor: Scalars['String']['output']; }; export type Node = { - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type Document = { - sys?: Maybe; - id: Scalars['ID']; - form: Scalars['JSON']; - values: Scalars['JSON']; + id: Scalars['ID']['output']; + _sys?: Maybe; + _values: Scalars['JSON']['output']; }; /** A relay-compliant pagination connection */ export type Connection = { - totalCount: Scalars['Int']; + totalCount: Scalars['Float']['output']; + pageInfo: PageInfo; }; export type Query = { __typename?: 'Query'; - getCollection: Collection; - getCollections: Array; + getOptimizedQuery?: Maybe; + collection: Collection; + collections: Array; node: Node; - getDocument: DocumentNode; - getDocumentList: DocumentConnection; - getDocumentFields: Scalars['JSON']; - getPostsDocument: PostsDocument; - getPostsList: PostsConnection; + document: DocumentNode; + posts: Posts; + postsConnection: PostsConnection; }; -export type QueryGetCollectionArgs = { - collection?: InputMaybe; +export type QueryGetOptimizedQueryArgs = { + queryString: Scalars['String']['input']; }; -export type QueryNodeArgs = { - id?: InputMaybe; +export type QueryCollectionArgs = { + collection?: InputMaybe; }; -export type QueryGetDocumentArgs = { - collection?: InputMaybe; - relativePath?: InputMaybe; +export type QueryNodeArgs = { + id?: InputMaybe; }; -export type QueryGetDocumentListArgs = { - before?: InputMaybe; - after?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; +export type QueryDocumentArgs = { + collection?: InputMaybe; + relativePath?: InputMaybe; }; -export type QueryGetPostsDocumentArgs = { - relativePath?: InputMaybe; +export type QueryPostsArgs = { + relativePath?: InputMaybe; }; -export type QueryGetPostsListArgs = { - before?: InputMaybe; - after?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; +export type QueryPostsConnectionArgs = { + before?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sort?: InputMaybe; + filter?: InputMaybe; +}; + +export type DocumentFilter = { + posts?: InputMaybe; }; export type DocumentConnectionEdges = { __typename?: 'DocumentConnectionEdges'; - cursor?: Maybe; + cursor: Scalars['String']['output']; node?: Maybe; }; export type DocumentConnection = Connection & { __typename?: 'DocumentConnection'; - pageInfo?: Maybe; - totalCount: Scalars['Int']; + pageInfo: PageInfo; + totalCount: Scalars['Float']['output']; edges?: Maybe>>; }; export type Collection = { __typename?: 'Collection'; - name: Scalars['String']; - slug: Scalars['String']; - label?: Maybe; - path: Scalars['String']; - format?: Maybe; - matches?: Maybe; - templates?: Maybe>>; - fields?: Maybe>>; + name: Scalars['String']['output']; + slug: Scalars['String']['output']; + label?: Maybe; + path: Scalars['String']['output']; + format?: Maybe; + matches?: Maybe; + templates?: Maybe>>; + fields?: Maybe>>; documents: DocumentConnection; }; export type CollectionDocumentsArgs = { - before?: InputMaybe; - after?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + before?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sort?: InputMaybe; + filter?: InputMaybe; + folder?: InputMaybe; }; -export type DocumentNode = PostsDocument; +export type DocumentNode = Posts | Folder; -export type Posts = { +export type Posts = Node & Document & { __typename?: 'Posts'; - title?: Maybe; - description?: Maybe; - date?: Maybe; - tags?: Maybe; - imageUrl?: Maybe; - body?: Maybe; + title?: Maybe; + description?: Maybe; + date?: Maybe; + tags?: Maybe; + imageUrl?: Maybe; + body?: Maybe; + id: Scalars['ID']['output']; + _sys: SystemInfo; + _values: Scalars['JSON']['output']; +}; + +export type StringFilter = { + startsWith?: InputMaybe; + eq?: InputMaybe; + exists?: InputMaybe; + in?: InputMaybe>>; +}; + +export type ImageFilter = { + startsWith?: InputMaybe; + eq?: InputMaybe; + exists?: InputMaybe; + in?: InputMaybe>>; +}; + +export type PostsBodyQuoteFilter = { + content?: InputMaybe; + author?: InputMaybe; + cite?: InputMaybe; +}; + +export type PostsBodyArticleImageFilter = { + src?: InputMaybe; + caption?: InputMaybe; +}; + +export type BooleanFilter = { + eq?: InputMaybe; + exists?: InputMaybe; +}; + +export type PostsBodyCodeFilter = { + code?: InputMaybe; + language?: InputMaybe; + selectedLines?: InputMaybe; + withCopyButton?: InputMaybe; + withLineNumbers?: InputMaybe; + caption?: InputMaybe; +}; + +export type PostsBodyFilter = { + Quote?: InputMaybe; + ArticleImage?: InputMaybe; + Code?: InputMaybe; }; -export type PostsDocument = Node & Document & { - __typename?: 'PostsDocument'; - id: Scalars['ID']; - sys: SystemInfo; - data: Posts; - form: Scalars['JSON']; - values: Scalars['JSON']; - dataJSON: Scalars['JSON']; +export type PostsFilter = { + title?: InputMaybe; + description?: InputMaybe; + date?: InputMaybe; + tags?: InputMaybe; + imageUrl?: InputMaybe; + body?: InputMaybe; }; export type PostsConnectionEdges = { __typename?: 'PostsConnectionEdges'; - cursor?: Maybe; - node?: Maybe; + cursor: Scalars['String']['output']; + node?: Maybe; }; export type PostsConnection = Connection & { __typename?: 'PostsConnection'; - pageInfo?: Maybe; - totalCount: Scalars['Int']; + pageInfo: PageInfo; + totalCount: Scalars['Float']['output']; edges?: Maybe>>; }; @@ -181,73 +249,100 @@ export type Mutation = { __typename?: 'Mutation'; addPendingDocument: DocumentNode; updateDocument: DocumentNode; + deleteDocument: DocumentNode; createDocument: DocumentNode; - updatePostsDocument: PostsDocument; - createPostsDocument: PostsDocument; + createFolder: DocumentNode; + updatePosts: Posts; + createPosts: Posts; }; export type MutationAddPendingDocumentArgs = { - collection: Scalars['String']; - relativePath: Scalars['String']; - template?: InputMaybe; + collection: Scalars['String']['input']; + relativePath: Scalars['String']['input']; + template?: InputMaybe; }; export type MutationUpdateDocumentArgs = { - collection?: InputMaybe; - relativePath: Scalars['String']; - params: DocumentMutation; + collection?: InputMaybe; + relativePath: Scalars['String']['input']; + params: DocumentUpdateMutation; +}; + + +export type MutationDeleteDocumentArgs = { + collection?: InputMaybe; + relativePath: Scalars['String']['input']; }; export type MutationCreateDocumentArgs = { - collection?: InputMaybe; - relativePath: Scalars['String']; + collection?: InputMaybe; + relativePath: Scalars['String']['input']; params: DocumentMutation; }; -export type MutationUpdatePostsDocumentArgs = { - relativePath: Scalars['String']; +export type MutationCreateFolderArgs = { + collection?: InputMaybe; + relativePath: Scalars['String']['input']; +}; + + +export type MutationUpdatePostsArgs = { + relativePath: Scalars['String']['input']; params: PostsMutation; }; -export type MutationCreatePostsDocumentArgs = { - relativePath: Scalars['String']; +export type MutationCreatePostsArgs = { + relativePath: Scalars['String']['input']; params: PostsMutation; }; +export type DocumentUpdateMutation = { + posts?: InputMaybe; + relativePath?: InputMaybe; +}; + export type DocumentMutation = { posts?: InputMaybe; }; export type PostsMutation = { - title?: InputMaybe; - description?: InputMaybe; - date?: InputMaybe; - tags?: InputMaybe; - imageUrl?: InputMaybe; - body?: InputMaybe; + title?: InputMaybe; + description?: InputMaybe; + date?: InputMaybe; + tags?: InputMaybe; + imageUrl?: InputMaybe; + body?: InputMaybe; }; -export type PostsPartsFragment = { __typename?: 'Posts', title?: string | null | undefined, description?: string | null | undefined, date?: string | null | undefined, tags?: string | null | undefined, imageUrl?: string | null | undefined, body?: any | null | undefined }; +export type PostsPartsFragment = { __typename: 'Posts', title?: string | null, description?: string | null, date?: string | null, tags?: string | null, imageUrl?: string | null, body?: any | null }; -export type GetPostsDocumentQueryVariables = Exact<{ - relativePath: Scalars['String']; +export type PostsQueryVariables = Exact<{ + relativePath: Scalars['String']['input']; }>; -export type GetPostsDocumentQuery = { __typename?: 'Query', getPostsDocument: { __typename?: 'PostsDocument', id: string, sys: { __typename?: 'SystemInfo', filename: string, basename: string, breadcrumbs: Array, path: string, relativePath: string, extension: string }, data: { __typename?: 'Posts', title?: string | null | undefined, description?: string | null | undefined, date?: string | null | undefined, tags?: string | null | undefined, imageUrl?: string | null | undefined, body?: any | null | undefined } } }; +export type PostsQuery = { __typename?: 'Query', posts: { __typename: 'Posts', id: string, title?: string | null, description?: string | null, date?: string | null, tags?: string | null, imageUrl?: string | null, body?: any | null, _sys: { __typename?: 'SystemInfo', filename: string, basename: string, hasReferences?: boolean | null, breadcrumbs: Array, path: string, relativePath: string, extension: string } } }; -export type GetPostsListQueryVariables = Exact<{ [key: string]: never; }>; +export type PostsConnectionQueryVariables = Exact<{ + before?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sort?: InputMaybe; + filter?: InputMaybe; +}>; -export type GetPostsListQuery = { __typename?: 'Query', getPostsList: { __typename?: 'PostsConnection', totalCount: number, edges?: Array<{ __typename?: 'PostsConnectionEdges', node?: { __typename?: 'PostsDocument', id: string, sys: { __typename?: 'SystemInfo', filename: string, basename: string, breadcrumbs: Array, path: string, relativePath: string, extension: string }, data: { __typename?: 'Posts', title?: string | null | undefined, description?: string | null | undefined, date?: string | null | undefined, tags?: string | null | undefined, imageUrl?: string | null | undefined, body?: any | null | undefined } } | null | undefined } | null | undefined> | null | undefined } }; +export type PostsConnectionQuery = { __typename?: 'Query', postsConnection: { __typename?: 'PostsConnection', totalCount: number, pageInfo: { __typename?: 'PageInfo', hasPreviousPage: boolean, hasNextPage: boolean, startCursor: string, endCursor: string }, edges?: Array<{ __typename?: 'PostsConnectionEdges', cursor: string, node?: { __typename: 'Posts', id: string, title?: string | null, description?: string | null, date?: string | null, tags?: string | null, imageUrl?: string | null, body?: any | null, _sys: { __typename?: 'SystemInfo', filename: string, basename: string, hasReferences?: boolean | null, breadcrumbs: Array, path: string, relativePath: string, extension: string } } | null } | null> | null } }; export const PostsPartsFragmentDoc = gql` fragment PostsParts on Posts { + __typename title description date @@ -256,42 +351,58 @@ export const PostsPartsFragmentDoc = gql` body } `; -export const GetPostsDocumentDocument = gql` - query getPostsDocument($relativePath: String!) { - getPostsDocument(relativePath: $relativePath) { - sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - id - data { - ...PostsParts +export const PostsDocument = gql` + query posts($relativePath: String!) { + posts(relativePath: $relativePath) { + ... on Document { + _sys { + filename + basename + hasReferences + breadcrumbs + path + relativePath + extension + } + id } + ...PostsParts } } ${PostsPartsFragmentDoc}`; -export const GetPostsListDocument = gql` - query getPostsList { - getPostsList { +export const PostsConnectionDocument = gql` + query postsConnection($before: String, $after: String, $first: Float, $last: Float, $sort: String, $filter: PostsFilter) { + postsConnection( + before: $before + after: $after + first: $first + last: $last + sort: $sort + filter: $filter + ) { + pageInfo { + hasPreviousPage + hasNextPage + startCursor + endCursor + } totalCount edges { + cursor node { - id - sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - data { - ...PostsParts + ... on Document { + _sys { + filename + basename + hasReferences + breadcrumbs + path + relativePath + extension + } + id } + ...PostsParts } } } @@ -300,40 +411,70 @@ export const GetPostsListDocument = gql` export type Requester = (doc: DocumentNode, vars?: V, options?: C) => Promise export function getSdk(requester: Requester) { return { - getPostsDocument(variables: GetPostsDocumentQueryVariables, options?: C): Promise<{data: GetPostsDocumentQuery, variables: GetPostsDocumentQueryVariables, query: string}> { - return requester<{data: GetPostsDocumentQuery, variables: GetPostsDocumentQueryVariables, query: string}, GetPostsDocumentQueryVariables>(GetPostsDocumentDocument, variables, options); + posts(variables: PostsQueryVariables, options?: C): Promise<{data: PostsQuery, errors?: { message: string, locations: { line: number, column: number }[], path: string[] }[], variables: PostsQueryVariables, query: string}> { + return requester<{data: PostsQuery, errors?: { message: string, locations: { line: number, column: number }[], path: string[] }[], variables: PostsQueryVariables, query: string}, PostsQueryVariables>(PostsDocument, variables, options); }, - getPostsList(variables?: GetPostsListQueryVariables, options?: C): Promise<{data: GetPostsListQuery, variables: GetPostsListQueryVariables, query: string}> { - return requester<{data: GetPostsListQuery, variables: GetPostsListQueryVariables, query: string}, GetPostsListQueryVariables>(GetPostsListDocument, variables, options); + postsConnection(variables?: PostsConnectionQueryVariables, options?: C): Promise<{data: PostsConnectionQuery, errors?: { message: string, locations: { line: number, column: number }[], path: string[] }[], variables: PostsConnectionQueryVariables, query: string}> { + return requester<{data: PostsConnectionQuery, errors?: { message: string, locations: { line: number, column: number }[], path: string[] }[], variables: PostsConnectionQueryVariables, query: string}, PostsConnectionQueryVariables>(PostsConnectionDocument, variables, options); } }; } export type Sdk = ReturnType; // TinaSDK generated code -import { staticRequest } from 'tinacms' -const requester: (doc: any, vars?: any, options?: any) => Promise = async ( - doc, - vars, - _options +import { createClient, TinaClient } from "tinacms/dist/client"; + +const generateRequester = ( + client: TinaClient, ) => { - let data = {} - try { - data = await staticRequest({ + const requester: ( + doc: any, + vars?: any, + options?: { + branch?: string, + /** + * Aside from `method` and `body`, all fetch options are passed + * through to underlying fetch request + */ + fetchOptions?: Omit[1], 'body' | 'method'>, + }, + client + ) => Promise = async (doc, vars, options) => { + let url = client.apiUrl + if (options?.branch) { + const index = client.apiUrl.lastIndexOf('/') + url = client.apiUrl.substring(0, index + 1) + options.branch + } + const data = await client.request({ query: doc, variables: vars, - }) - } catch (e) { - // swallow errors related to document creation - console.warn('Warning: There was an error when fetching data') - console.warn(e) + url, + }, options) + + return { data: data?.data, errors: data?.errors, query: doc, variables: vars || {} } } - return { data, query: doc, variables: vars || {} } + return requester } /** * @experimental this class can be used but may change in the future **/ -export const ExperimentalGetTinaClient = ()=>getSdk(requester) +export const ExperimentalGetTinaClient = () => + getSdk( + generateRequester( + createClient({ + url: "http://localhost:4001/graphql", + queries, + }) + ) + ) + +export const queries = ( + client: TinaClient, +) => { + const requester = generateRequester(client) + return getSdk(requester) +} + \ No newline at end of file diff --git a/.tina/config.ts b/.tina/config.ts new file mode 100644 index 000000000..cff1c70a3 --- /dev/null +++ b/.tina/config.ts @@ -0,0 +1,162 @@ +import { defineConfig } from 'tinacms'; + +const branch = + process.env.NEXT_PUBLIC_EDIT_BRANCH || + 'master'; + +export default defineConfig({ + branch, + clientId: process.env.NEXT_PUBLIC_TINA_CLIENT_ID, + build: { + outputFolder: 'admin', + publicFolder: 'public', + }, + media: { + tina: { + mediaRoot: '', + publicFolder: 'public', + }, + }, + schema: { + collections: [ + { + label: 'Blog Posts', + name: 'posts', + path: 'content/posts', + format: 'mdx', + fields: [ + { + type: 'string', + label: 'Title', + name: 'title', + }, + { + type: 'string', + label: 'Description', + name: 'description', + }, + { + type: 'string', + label: 'Date', + name: 'date', + }, + { + type: 'string', + label: 'Tags', + name: 'tags', + }, + { + type: 'image', + label: 'Image URL', + name: 'imageUrl', + }, + { + type: 'rich-text', + label: 'Blog Post Body', + name: 'body', + isBody: true, + templates: [ + { + name: 'Quote', + label: 'Quote', + fields: [ + { + type: 'string', + name: 'content', + label: 'Content', + }, + { + type: 'string', + name: 'author', + label: 'Author', + }, + { + type: 'string', + name: 'cite', + label: 'Cite', + }, + ], + }, + { + name: 'ArticleImage', + label: 'ArticleImage', + fields: [ + { + type: 'string', + name: 'src', + label: 'Src', + }, + { + type: 'string', + name: 'caption', + label: 'Caption', + }, + ], + }, + { + name: 'Code', + label: 'Code', + fields: [ + { + type: 'string', + name: 'code', + label: 'Code', + }, + { + type: 'string', + name: 'language', + label: 'Language', + }, + { + type: 'string', + name: 'selectedLines', + label: 'Selected Lines', + }, + { + type: 'boolean', + name: 'withCopyButton', + label: 'With Copy Button', + }, + { + type: 'boolean', + name: 'withLineNumbers', + label: 'With Line Numbers', + }, + { + type: 'string', + name: 'caption', + label: 'Caption', + }, + ], + }, + // { + // name: 'h2', + // label: 'H2', + // inline: true, + // fields: [], + // }, + // { + // name: 'h3', + // label: 'H3', + // inline: true, + // fields: [], + // }, + // { + // name: 'br', + // label: 'BR', + // inline: true, + // fields: [], + // }, + // { + // name: 'p', + // label: 'P', + // inline: true, + // fields: [], + // }, + ] + } + ], + }, + ], + } +}); diff --git a/.tina/schema.ts b/.tina/schema.ts deleted file mode 100644 index 1a6c6cd97..000000000 --- a/.tina/schema.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { defineSchema } from '@tinacms/cli'; - -export default defineSchema({ - collections: [ - { - label: 'Blog Posts', - name: 'posts', - path: 'posts', - fields: [ - { - type: 'string', - label: 'Title', - name: 'title', - }, - { - type: 'string', - label: 'Description', - name: 'description', - }, - { - type: 'string', - label: 'Date', - name: 'date', - }, - { - type: 'string', - label: 'Tags', - name: 'tags', - }, - { - type: 'string', - label: 'Image URL', - name: 'imageUrl', - }, - { - type: 'rich-text', - label: 'Blog Post Body', - name: 'body', - isBody: true, - templates: [ - { - name: 'Quote', - label: 'Quote', - fields: [ - { - type: 'string', - name: 'content', - label: 'Content', - }, - { - type: 'string', - name: 'author', - label: 'Author', - }, - { - type: 'string', - name: 'cite', - label: 'Cite', - }, - ], - }, - { - name: 'ArticleImage', - label: 'ArticleImage', - fields: [ - { - type: 'string', - name: 'src', - label: 'Src', - }, - { - type: 'string', - name: 'caption', - label: 'Caption', - }, - ], - }, - { - name: 'Code', - label: 'Code', - fields: [ - { - type: 'string', - name: 'code', - label: 'Code', - }, - { - type: 'string', - name: 'language', - label: 'Language', - }, - { - type: 'string', - name: 'selectedLines', - label: 'Selected Lines', - }, - { - type: 'boolean', - name: 'withCopyButton', - label: 'With Copy Button', - }, - { - type: 'boolean', - name: 'withLineNumbers', - label: 'With Line Numbers', - }, - { - type: 'string', - name: 'caption', - label: 'Caption', - }, - ], - }, - { - name: 'h2', - label: 'H2', - inline: true, - fields: [], - }, - { - name: 'h3', - label: 'H3', - inline: true, - fields: [], - }, - { - name: 'br', - label: 'BR', - inline: true, - fields: [], - }, - { - name: 'p', - label: 'P', - inline: true, - fields: [], - }, - ], - }, - ], - }, - ], -}); diff --git a/components/ArticleCard.tsx b/components/ArticleCard.tsx index 353daa611..faac2d60d 100644 --- a/components/ArticleCard.tsx +++ b/components/ArticleCard.tsx @@ -16,7 +16,14 @@ export default function ArticleCard({ title, slug, imageUrl, description }: Arti - + {title} @@ -28,7 +35,7 @@ export default function ArticleCard({ title, slug, imageUrl, description }: Arti ); } -const ArticleCardWrapper = styled.a` +const ArticleCardWrapper = styled.span` display: flex; flex-direction: column; height: 45rem; diff --git a/components/ArticleImage.tsx b/components/ArticleImage.tsx index 4e4feb7dd..a5fe5774b 100644 --- a/components/ArticleImage.tsx +++ b/components/ArticleImage.tsx @@ -7,7 +7,7 @@ interface ArticleImageProps extends ImageProps { caption?: string; } -export default function ArticleImage({ src, caption, ...rest }: ArticleImageProps) { +export default function ArticleImage({ src, caption, alt, ...rest }: ArticleImageProps) { return ( @@ -16,10 +16,12 @@ export default function ArticleImage({ src, caption, ...rest }: ArticleImageProp alt={caption || 'Article Image'} placeholder="blur" blurDataURL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mPkj6+vBwAC4AFuNSmtGAAAAABJRU5ErkJggg==" - layout="fill" - objectFit="cover" {...rest} - /> + fill + sizes="100vw" + style={{ + objectFit: "cover" + }} /> {caption} diff --git a/components/BasicCard.tsx b/components/BasicCard.tsx index 0a8e41635..2aaea4803 100644 --- a/components/BasicCard.tsx +++ b/components/BasicCard.tsx @@ -9,11 +9,18 @@ interface BasicCardProps { export default function BasicCard({ title, description, imageUrl }: BasicCardProps) { return ( - - + ( + {title} {description} - + ) ); } diff --git a/components/BasicSection.tsx b/components/BasicSection.tsx index fe6c74684..7bc4c54bc 100644 --- a/components/BasicSection.tsx +++ b/components/BasicSection.tsx @@ -17,7 +17,14 @@ export default function BasicSection({ imageUrl, title, overTitle, reversed, chi return ( - + {overTitle} @@ -74,7 +81,7 @@ const ContentContainer = styled.div` `; type Props = Pick; -const BasicSectionWrapper = styled(Container)` +const BasicSectionWrapper = styled(Container)` display: flex; align-items: center; flex-direction: ${(p: Props) => (p.reversed ? 'row-reverse' : 'row')}; diff --git a/components/Button.tsx b/components/Button.tsx index 09194a94d..c9a0f1b09 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -3,7 +3,7 @@ import styled from 'styled-components'; type ButtonProps = PropsWithChildren<{ transparent?: boolean }>; -const Button = styled.a` +const Button = styled('span').withConfig({shouldForwardProp: (prop) => !['transparent'].includes(prop)})` border: none; background: none; display: inline-block; diff --git a/components/Code.tsx b/components/Code.tsx index 3416dbdf1..acf7cf26d 100644 --- a/components/Code.tsx +++ b/components/Code.tsx @@ -1,4 +1,4 @@ -import Highlight, { defaultProps, Language } from 'prism-react-renderer'; +import { Highlight, Language } from 'prism-react-renderer'; import React from 'react'; import styled from 'styled-components'; import ClientOnly from 'components/ClientOnly'; @@ -39,7 +39,7 @@ export default function Code({ return ( <> - + {({ className, style, tokens, getLineProps, getTokenProps }) => ( <> @@ -48,7 +48,7 @@ export default function Code({ {tokens.map((line, i) => { const lineNumber = i + 1; const isSelected = selectedLines.includes(lineNumber); - const lineProps = getLineProps({ line, key: i }); + const lineProps = getLineProps({ line }); const className = lineProps.className + (isSelected ? ' selected-line' : ''); return ( @@ -56,7 +56,7 @@ export default function Code({ {withLineNumbers && {lineNumber}} {line.map((token, key) => ( - + ))} @@ -90,7 +90,7 @@ const Caption = styled.small` font-size: 1.2rem; `; -const CopyButton = styled.button<{ copied: boolean }>` +const CopyButton = styled('button').withConfig({shouldForwardProp: (prop) => !['copied'].includes(prop)})<{ copied: boolean }>` position: absolute; border: none; top: 2.4rem; @@ -127,7 +127,7 @@ const CopyButton = styled.button<{ copied: boolean }>` } `; -const CodeWrapper = styled.div<{ language: string }>` +const CodeWrapper = styled('div').withConfig({shouldForwardProp: (prop) => !['language'].includes(prop)})<{ language: string }>` position: relative; border-radius: 0.3em; margin-top: 4.5rem; diff --git a/components/Footer.tsx b/components/Footer.tsx index 69a30f9a5..3349f5d35 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -58,21 +58,15 @@ export default function Footer() { - - - + - - - + - - - + © Copyright 2021 My Saas Startup @@ -97,7 +91,7 @@ function ListItem({ title, href }: SingleFooterListItem) { return ( - {title} + {title} ); diff --git a/components/Link.tsx b/components/Link.tsx index ec091c211..cb451d60d 100644 --- a/components/Link.tsx +++ b/components/Link.tsx @@ -14,7 +14,7 @@ export default function Link({ href, children }: PropsWithChildren) { ); } -const Anchor = styled.a` +const Anchor = styled.span` display: inline; width: fit-content; text-decoration: none; diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 9e276fa9d..0316138af 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -67,7 +67,7 @@ export default function Navbar({ items }: NavbarProps) { return (