From 6ad54321c02863aeab4f92c9a23a4797cd7a9c5b Mon Sep 17 00:00:00 2001 From: Bart Stefanski Date: Sun, 11 Dec 2022 16:06:23 +0100 Subject: [PATCH] Revert "Merge pull request #51 from jamespohalloran/upgrade-tina" This reverts commit eaf5158766181dfcf3723fbf1162232200ac060e, reversing changes made to 8f83912338652020259b1b6756295a10e90fc4dd. --- .env.example | 4 +- .tina/__generated__/.gitignore | 13 +- .tina/__generated__/_graphql.json | 1917 ++++++++++++++- .tina/__generated__/_lookup.json | 32 +- .tina/__generated__/_schema.json | 277 ++- .tina/__generated__/frags.gql | 2 +- .tina/__generated__/queries.gql | 66 +- .tina/__generated__/schema.gql | 116 +- .tina/__generated__/types.ts | 327 +-- .tina/config.ts | 131 -- .tina/schema.ts | 143 ++ next.config.js | 8 - package.json | 6 +- pages/_app.tsx | 19 + pages/admin/[[...tina]].tsx | 3 + pages/blog/[slug].tsx | 93 +- public/admin/.gitignore | 2 - yarn.lock | 3599 ++++++++++++----------------- 18 files changed, 4065 insertions(+), 2693 deletions(-) delete mode 100644 .tina/config.ts create mode 100644 .tina/schema.ts create mode 100644 pages/admin/[[...tina]].tsx delete mode 100644 public/admin/.gitignore diff --git a/.env.example b/.env.example index 721f84840..bbce85ad1 100644 --- a/.env.example +++ b/.env.example @@ -2,6 +2,4 @@ SENDGRID_API_KEY= NEXT_PUBLIC_TINA_CLIENT_ID= NEXT_PUBLIC_EDIT_BRANCH="master" NEXT_PUBLIC_ORGANIZATION_NAME= -NEXT_PUBLIC_USE_LOCAL_CLIENT="" -TINA_CLIENT_ID="" -TINA_TOKEN="" \ No newline at end of file +NEXT_PUBLIC_USE_LOCAL_CLIENT="" \ No newline at end of file diff --git a/.tina/__generated__/.gitignore b/.tina/__generated__/.gitignore index 0ea22edca..5baa59d64 100644 --- a/.tina/__generated__/.gitignore +++ b/.tina/__generated__/.gitignore @@ -1,12 +1 @@ -app -db -prebuild -client.ts -client.js -types.ts -types.js -types.d.ts -frags.gql -queries.gql -schema.gql -out.jsx +db \ No newline at end of file diff --git a/.tina/__generated__/_graphql.json b/.tina/__generated__/_graphql.json index 107ce87ad..f0770072c 100644 --- a/.tina/__generated__/_graphql.json +++ b/.tina/__generated__/_graphql.json @@ -1 +1,1916 @@ -{"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":"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":"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":"post"},"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":"Post"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"postConnection"},"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":"PostFilter"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PostConnection"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"DocumentFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"post"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostFilter"}}}]},{"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"}}}],"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":"Post"}}]},{"kind":"ObjectTypeDefinition","interfaces":[{"kind":"NamedType","name":{"kind":"Name","value":"Node"}},{"kind":"NamedType","name":{"kind":"Name","value":"Document"}}],"directives":[],"name":{"kind":"Name","value":"Post"},"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":"PostBodyQuoteFilter"},"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":"PostBodyArticleImageFilter"},"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":"PostBodyCodeFilter"},"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":"PostBodyFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"Quote"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostBodyQuoteFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"ArticleImage"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostBodyArticleImageFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"Code"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostBodyCodeFilter"}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"PostFilter"},"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":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"body"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostBodyFilter"}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"PostConnectionEdges"},"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":"Post"}}}]},{"kind":"ObjectTypeDefinition","interfaces":[{"kind":"NamedType","name":{"kind":"Name","value":"Connection"}}],"directives":[],"name":{"kind":"Name","value":"PostConnection"},"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":"PostConnectionEdges"}}}}]},{"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":"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":"updatePost"},"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":"PostMutation"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Post"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"createPost"},"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":"PostMutation"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Post"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"DocumentMutation"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"post"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostMutation"}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"PostMutation"},"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": "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 diff --git a/.tina/__generated__/_lookup.json b/.tina/__generated__/_lookup.json index b8e2a30b6..53ab1495c 100644 --- a/.tina/__generated__/_lookup.json +++ b/.tina/__generated__/_lookup.json @@ -1 +1,31 @@ -{"DocumentConnection":{"type":"DocumentConnection","resolveType":"multiCollectionDocumentList","collections":["post"]},"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"},"Posts":{"type":"Posts","resolveType":"collectionDocument","collection":"posts","createPosts":"create","updatePosts":"update"},"Post":{"type":"Post","resolveType":"collectionDocument","collection":"post","createPost":"create","updatePost":"update"},"PostConnection":{"type":"PostConnection","resolveType":"collectionDocumentList","collection":"post"}} \ 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" + }, + "PostsDocument": { + "type": "PostsDocument", + "resolveType": "collectionDocument", + "collection": "posts", + "createPostsDocument": "create", + "updatePostsDocument": "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 182697c22..a29551317 100644 --- a/.tina/__generated__/_schema.json +++ b/.tina/__generated__/_schema.json @@ -1 +1,276 @@ -{"version":{"fullVersion":"1.0.1","major":"1","minor":"0","patch":"1"},"meta":{"flags":["experimentalData","isomorphicGitBridge"]},"collections":[{"label":"Blog Posts","name":"post","path":"posts","format":"mdx","ui":{},"fields":[{"type":"string","label":"Title","name":"title","namespace":["post","title"]},{"type":"string","label":"Description","name":"description","namespace":["post","description"]},{"type":"string","label":"Date","name":"date","namespace":["post","date"]},{"type":"string","label":"Tags","name":"tags","namespace":["post","tags"]},{"type":"string","label":"Image URL","name":"imageUrl","namespace":["post","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":["post","body","Quote","content"]},{"type":"string","name":"author","label":"Author","namespace":["post","body","Quote","author"]},{"type":"string","name":"cite","label":"Cite","namespace":["post","body","Quote","cite"]}],"namespace":["post","body","Quote"]},{"name":"ArticleImage","label":"ArticleImage","fields":[{"type":"string","name":"src","label":"Src","namespace":["post","body","ArticleImage","src"]},{"type":"string","name":"caption","label":"Caption","namespace":["post","body","ArticleImage","caption"]}],"namespace":["post","body","ArticleImage"]},{"name":"Code","label":"Code","fields":[{"type":"string","name":"code","label":"Code","namespace":["post","body","Code","code"]},{"type":"string","name":"language","label":"Language","namespace":["post","body","Code","language"]},{"type":"string","name":"selectedLines","label":"Selected Lines","namespace":["post","body","Code","selectedLines"]},{"type":"boolean","name":"withCopyButton","label":"With Copy Button","namespace":["post","body","Code","withCopyButton"]},{"type":"boolean","name":"withLineNumbers","label":"With Line Numbers","namespace":["post","body","Code","withLineNumbers"]},{"type":"string","name":"caption","label":"Caption","namespace":["post","body","Code","caption"]}],"namespace":["post","body","Code"]}],"namespace":["post","body"]}],"namespace":["post"]}],"config":{}} \ No newline at end of file +{ + "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 diff --git a/.tina/__generated__/frags.gql b/.tina/__generated__/frags.gql index 43e11b63a..595ff5003 100644 --- a/.tina/__generated__/frags.gql +++ b/.tina/__generated__/frags.gql @@ -1,4 +1,4 @@ -fragment PostParts on Post { +fragment PostsParts on Posts { title description date diff --git a/.tina/__generated__/queries.gql b/.tina/__generated__/queries.gql index 6b82f53ef..949e4040d 100644 --- a/.tina/__generated__/queries.gql +++ b/.tina/__generated__/queries.gql @@ -1,51 +1,37 @@ -query post($relativePath: String!) { - post(relativePath: $relativePath) { - ... on Document { - _sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - id +query getPostsDocument($relativePath: String!) { + getPostsDocument(relativePath: $relativePath) { + sys { + filename + basename + breadcrumbs + path + relativePath + extension + } + id + data { + ...PostsParts } - ...PostParts } } -query postConnection($before: String, $after: String, $first: Float, $last: Float, $sort: String, $filter: PostFilter) { - postConnection( - before: $before - after: $after - first: $first - last: $last - sort: $sort - filter: $filter - ) { - pageInfo { - hasPreviousPage - hasNextPage - startCursor - endCursor - } +query getPostsList { + getPostsList { totalCount edges { - cursor node { - ... on Document { - _sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - id + id + sys { + filename + basename + breadcrumbs + path + relativePath + extension + } + data { + ...PostsParts } - ...PostParts } } } diff --git a/.tina/__generated__/schema.gql b/.tina/__generated__/schema.gql index e114e8302..c7b1d6307 100644 --- a/.tina/__generated__/schema.gql +++ b/.tina/__generated__/schema.gql @@ -7,7 +7,6 @@ scalar JSON type SystemInfo { filename: String! - title: String basename: String! breadcrumbs(excludeExtension: Boolean): [String!]! path: String! @@ -31,39 +30,36 @@ interface Node { """""" interface Document { + sys: SystemInfo id: ID! - _sys: SystemInfo - _values: JSON! + form: JSON! + values: JSON! } """A relay-compliant pagination connection""" interface Connection { - totalCount: Float! - pageInfo: PageInfo! + totalCount: Int! } type Query { - getOptimizedQuery(queryString: String!): String - collection(collection: String): Collection! - collections: [Collection!]! + getCollection(collection: String): Collection! + getCollections: [Collection!]! node(id: String): Node! - document(collection: String, relativePath: String): DocumentNode! - post(relativePath: String): Post! - postConnection(before: String, after: String, first: Float, last: Float, sort: String, filter: PostFilter): PostConnection! -} - -input DocumentFilter { - post: PostFilter + 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! } type DocumentConnectionEdges { - cursor: String! + cursor: String node: DocumentNode } type DocumentConnection implements Connection { - pageInfo: PageInfo! - totalCount: Float! + pageInfo: PageInfo + totalCount: Int! edges: [DocumentConnectionEdges] } @@ -76,95 +72,53 @@ type Collection { matches: String templates: [JSON] fields: [JSON] - documents(before: String, after: String, first: Float, last: Float, sort: String, filter: DocumentFilter): DocumentConnection! + documents(before: String, after: String, first: Int, last: Int): DocumentConnection! } -union DocumentNode = Post +union DocumentNode = PostsDocument -type Post implements Node & Document { +type Posts { title: String description: String date: String tags: String imageUrl: String body: JSON - id: ID! - _sys: SystemInfo! - _values: JSON! } -input StringFilter { - startsWith: String - eq: String - exists: Boolean - in: [String] -} - -input PostBodyQuoteFilter { - content: StringFilter - author: StringFilter - cite: StringFilter -} - -input PostBodyArticleImageFilter { - src: StringFilter - caption: StringFilter -} - -input BooleanFilter { - eq: Boolean - exists: Boolean -} - -input PostBodyCodeFilter { - code: StringFilter - language: StringFilter - selectedLines: StringFilter - withCopyButton: BooleanFilter - withLineNumbers: BooleanFilter - caption: StringFilter -} - -input PostBodyFilter { - Quote: PostBodyQuoteFilter - ArticleImage: PostBodyArticleImageFilter - Code: PostBodyCodeFilter -} - -input PostFilter { - title: StringFilter - description: StringFilter - date: StringFilter - tags: StringFilter - imageUrl: StringFilter - body: PostBodyFilter +type PostsDocument implements Node & Document { + id: ID! + sys: SystemInfo! + data: Posts! + form: JSON! + values: JSON! + dataJSON: JSON! } -type PostConnectionEdges { - cursor: String! - node: Post +type PostsConnectionEdges { + cursor: String + node: PostsDocument } -type PostConnection implements Connection { - pageInfo: PageInfo! - totalCount: Float! - edges: [PostConnectionEdges] +type PostsConnection implements Connection { + pageInfo: PageInfo + totalCount: Int! + edges: [PostsConnectionEdges] } type Mutation { addPendingDocument(collection: String!, relativePath: String!, template: String): DocumentNode! updateDocument(collection: String, relativePath: String!, params: DocumentMutation!): DocumentNode! - deleteDocument(collection: String, relativePath: String!): DocumentNode! createDocument(collection: String, relativePath: String!, params: DocumentMutation!): DocumentNode! - updatePost(relativePath: String!, params: PostMutation!): Post! - createPost(relativePath: String!, params: PostMutation!): Post! + updatePostsDocument(relativePath: String!, params: PostsMutation!): PostsDocument! + createPostsDocument(relativePath: String!, params: PostsMutation!): PostsDocument! } input DocumentMutation { - post: PostMutation + posts: PostsMutation } -input PostMutation { +input PostsMutation { title: String description: String date: String diff --git a/.tina/__generated__/types.ts b/.tina/__generated__/types.ts index 98e66bb74..c2ff7e84a 100644 --- a/.tina/__generated__/types.ts +++ b/.tina/__generated__/types.ts @@ -1,13 +1,7 @@ //@ts-nocheck - // 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; +// DO NOT MODIFY THIS FILE. This file is automatically generated by Tina +import { gql } from 'tinacms'; +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 }; @@ -27,7 +21,6 @@ export type Scalars = { export type SystemInfo = { __typename?: 'SystemInfo'; filename: Scalars['String']; - title?: Maybe; basename: Scalars['String']; breadcrumbs: Array; path: Scalars['String']; @@ -55,35 +48,31 @@ export type Node = { }; export type Document = { + sys?: Maybe; id: Scalars['ID']; - _sys?: Maybe; - _values: Scalars['JSON']; + form: Scalars['JSON']; + values: Scalars['JSON']; }; /** A relay-compliant pagination connection */ export type Connection = { - totalCount: Scalars['Float']; - pageInfo: PageInfo; + totalCount: Scalars['Int']; }; export type Query = { __typename?: 'Query'; - getOptimizedQuery?: Maybe; - collection: Collection; - collections: Array; + getCollection: Collection; + getCollections: Array; node: Node; - document: DocumentNode; - post: Post; - postConnection: PostConnection; -}; - - -export type QueryGetOptimizedQueryArgs = { - queryString: Scalars['String']; + getDocument: DocumentNode; + getDocumentList: DocumentConnection; + getDocumentFields: Scalars['JSON']; + getPostsDocument: PostsDocument; + getPostsList: PostsConnection; }; -export type QueryCollectionArgs = { +export type QueryGetCollectionArgs = { collection?: InputMaybe; }; @@ -93,40 +82,42 @@ export type QueryNodeArgs = { }; -export type QueryDocumentArgs = { +export type QueryGetDocumentArgs = { collection?: InputMaybe; relativePath?: InputMaybe; }; -export type QueryPostArgs = { +export type QueryGetDocumentListArgs = { + before?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + + +export type QueryGetPostsDocumentArgs = { relativePath?: InputMaybe; }; -export type QueryPostConnectionArgs = { +export type QueryGetPostsListArgs = { before?: InputMaybe; after?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - sort?: InputMaybe; - filter?: InputMaybe; -}; - -export type DocumentFilter = { - post?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type DocumentConnectionEdges = { __typename?: 'DocumentConnectionEdges'; - cursor: Scalars['String']; + cursor?: Maybe; node?: Maybe; }; export type DocumentConnection = Connection & { __typename?: 'DocumentConnection'; - pageInfo: PageInfo; - totalCount: Scalars['Float']; + pageInfo?: Maybe; + totalCount: Scalars['Int']; edges?: Maybe>>; }; @@ -147,95 +138,52 @@ export type Collection = { export type CollectionDocumentsArgs = { before?: InputMaybe; after?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - sort?: InputMaybe; - filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; -export type DocumentNode = Post; +export type DocumentNode = PostsDocument; -export type Post = Node & Document & { - __typename?: 'Post'; +export type Posts = { + __typename?: 'Posts'; title?: Maybe; description?: Maybe; date?: Maybe; tags?: Maybe; imageUrl?: Maybe; body?: Maybe; - id: Scalars['ID']; - _sys: SystemInfo; - _values: Scalars['JSON']; -}; - -export type StringFilter = { - startsWith?: InputMaybe; - eq?: InputMaybe; - exists?: InputMaybe; - in?: InputMaybe>>; -}; - -export type PostBodyQuoteFilter = { - content?: InputMaybe; - author?: InputMaybe; - cite?: InputMaybe; -}; - -export type PostBodyArticleImageFilter = { - src?: InputMaybe; - caption?: InputMaybe; -}; - -export type BooleanFilter = { - eq?: InputMaybe; - exists?: InputMaybe; }; -export type PostBodyCodeFilter = { - code?: InputMaybe; - language?: InputMaybe; - selectedLines?: InputMaybe; - withCopyButton?: InputMaybe; - withLineNumbers?: InputMaybe; - caption?: InputMaybe; -}; - -export type PostBodyFilter = { - Quote?: InputMaybe; - ArticleImage?: InputMaybe; - Code?: InputMaybe; -}; - -export type PostFilter = { - title?: InputMaybe; - description?: InputMaybe; - date?: InputMaybe; - tags?: InputMaybe; - imageUrl?: InputMaybe; - body?: 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 PostConnectionEdges = { - __typename?: 'PostConnectionEdges'; - cursor: Scalars['String']; - node?: Maybe; +export type PostsConnectionEdges = { + __typename?: 'PostsConnectionEdges'; + cursor?: Maybe; + node?: Maybe; }; -export type PostConnection = Connection & { - __typename?: 'PostConnection'; - pageInfo: PageInfo; - totalCount: Scalars['Float']; - edges?: Maybe>>; +export type PostsConnection = Connection & { + __typename?: 'PostsConnection'; + pageInfo?: Maybe; + totalCount: Scalars['Int']; + edges?: Maybe>>; }; export type Mutation = { __typename?: 'Mutation'; addPendingDocument: DocumentNode; updateDocument: DocumentNode; - deleteDocument: DocumentNode; createDocument: DocumentNode; - updatePost: Post; - createPost: Post; + updatePostsDocument: PostsDocument; + createPostsDocument: PostsDocument; }; @@ -253,12 +201,6 @@ export type MutationUpdateDocumentArgs = { }; -export type MutationDeleteDocumentArgs = { - collection?: InputMaybe; - relativePath: Scalars['String']; -}; - - export type MutationCreateDocumentArgs = { collection?: InputMaybe; relativePath: Scalars['String']; @@ -266,22 +208,22 @@ export type MutationCreateDocumentArgs = { }; -export type MutationUpdatePostArgs = { +export type MutationUpdatePostsDocumentArgs = { relativePath: Scalars['String']; - params: PostMutation; + params: PostsMutation; }; -export type MutationCreatePostArgs = { +export type MutationCreatePostsDocumentArgs = { relativePath: Scalars['String']; - params: PostMutation; + params: PostsMutation; }; export type DocumentMutation = { - post?: InputMaybe; + posts?: InputMaybe; }; -export type PostMutation = { +export type PostsMutation = { title?: InputMaybe; description?: InputMaybe; date?: InputMaybe; @@ -290,29 +232,22 @@ export type PostMutation = { body?: InputMaybe; }; -export type PostPartsFragment = { __typename?: 'Post', 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 | undefined, description?: string | null | undefined, date?: string | null | undefined, tags?: string | null | undefined, imageUrl?: string | null | undefined, body?: any | null | undefined }; -export type PostQueryVariables = Exact<{ +export type GetPostsDocumentQueryVariables = Exact<{ relativePath: Scalars['String']; }>; -export type PostQuery = { __typename?: 'Query', post: { __typename?: 'Post', id: string, title?: string | null | undefined, description?: string | null | undefined, date?: string | null | undefined, tags?: string | null | undefined, imageUrl?: string | null | undefined, body?: any | null | undefined, _sys: { __typename?: 'SystemInfo', filename: string, basename: string, breadcrumbs: Array, path: string, relativePath: string, extension: string } } }; +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 PostConnectionQueryVariables = Exact<{ - before?: InputMaybe; - after?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - sort?: InputMaybe; - filter?: InputMaybe; -}>; +export type GetPostsListQueryVariables = Exact<{ [key: string]: never; }>; -export type PostConnectionQuery = { __typename?: 'Query', postConnection: { __typename?: 'PostConnection', totalCount: number, pageInfo: { __typename?: 'PageInfo', hasPreviousPage: boolean, hasNextPage: boolean, startCursor: string, endCursor: string }, edges?: Array<{ __typename?: 'PostConnectionEdges', cursor: string, node?: { __typename?: 'Post', id: string, title?: string | null | undefined, description?: string | null | undefined, date?: string | null | undefined, tags?: string | null | undefined, imageUrl?: string | null | undefined, body?: any | null | undefined, _sys: { __typename?: 'SystemInfo', filename: string, basename: string, breadcrumbs: Array, path: string, relativePath: string, extension: string } } | null | undefined } | null | undefined> | null | undefined } }; +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 const PostPartsFragmentDoc = gql` - fragment PostParts on Post { +export const PostsPartsFragmentDoc = gql` + fragment PostsParts on Posts { title description date @@ -321,106 +256,84 @@ export const PostPartsFragmentDoc = gql` body } `; -export const PostDocument = gql` - query post($relativePath: String!) { - post(relativePath: $relativePath) { - ... on Document { - _sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - id +export const GetPostsDocumentDocument = gql` + query getPostsDocument($relativePath: String!) { + getPostsDocument(relativePath: $relativePath) { + sys { + filename + basename + breadcrumbs + path + relativePath + extension + } + id + data { + ...PostsParts } - ...PostParts } } - ${PostPartsFragmentDoc}`; -export const PostConnectionDocument = gql` - query postConnection($before: String, $after: String, $first: Float, $last: Float, $sort: String, $filter: PostFilter) { - postConnection( - before: $before - after: $after - first: $first - last: $last - sort: $sort - filter: $filter - ) { - pageInfo { - hasPreviousPage - hasNextPage - startCursor - endCursor - } + ${PostsPartsFragmentDoc}`; +export const GetPostsListDocument = gql` + query getPostsList { + getPostsList { totalCount edges { - cursor node { - ... on Document { - _sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - id + id + sys { + filename + basename + breadcrumbs + path + relativePath + extension + } + data { + ...PostsParts } - ...PostParts } } } } - ${PostPartsFragmentDoc}`; + ${PostsPartsFragmentDoc}`; export type Requester = (doc: DocumentNode, vars?: V, options?: C) => Promise export function getSdk(requester: Requester) { return { - post(variables: PostQueryVariables, options?: C): Promise<{data: PostQuery, variables: PostQueryVariables, query: string}> { - return requester<{data: PostQuery, variables: PostQueryVariables, query: string}, PostQueryVariables>(PostDocument, variables, options); + getPostsDocument(variables: GetPostsDocumentQueryVariables, options?: C): Promise<{data: GetPostsDocumentQuery, variables: GetPostsDocumentQueryVariables, query: string}> { + return requester<{data: GetPostsDocumentQuery, variables: GetPostsDocumentQueryVariables, query: string}, GetPostsDocumentQueryVariables>(GetPostsDocumentDocument, variables, options); }, - postConnection(variables?: PostConnectionQueryVariables, options?: C): Promise<{data: PostConnectionQuery, variables: PostConnectionQueryVariables, query: string}> { - return requester<{data: PostConnectionQuery, variables: PostConnectionQueryVariables, query: string}, PostConnectionQueryVariables>(PostConnectionDocument, 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); } }; } export type Sdk = ReturnType; // TinaSDK generated code -import { createClient, TinaClient } from "tinacms/dist/client"; - -const generateRequester = (client: TinaClient) => { - const requester: ( - doc: any, - vars?: any, - options?: any, - client - ) => Promise = async (doc, vars, _options) => { - const data = await client.request({ +import { staticRequest } from 'tinacms' +const requester: (doc: any, vars?: any, options?: any) => Promise = async ( + doc, + vars, + _options +) => { + let data = {} + try { + data = await staticRequest({ query: doc, variables: vars, - }); - - return { data: data?.data, 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) + } - return requester; -}; + return { data, query: doc, variables: vars || {} } +} /** * @experimental this class can be used but may change in the future **/ -export const ExperimentalGetTinaClient = () => - getSdk( - generateRequester(createClient({ url: "http://localhost:4001/graphql", queries })) - ); - -export const queries = (client: TinaClient) => { - const requester = generateRequester(client); - return getSdk(requester); -}; +export const ExperimentalGetTinaClient = ()=>getSdk(requester) - \ No newline at end of file diff --git a/.tina/config.ts b/.tina/config.ts deleted file mode 100644 index 9bac33773..000000000 --- a/.tina/config.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { defineConfig } from 'tinacms'; - -export default defineConfig({ - branch: process.env.HEAD || process.env.VERCEL_GIT_COMMIT_REF || 'master', - clientId: process.env.TINA_CLIENT_ID!, // Get this from tina.io - token: process.env.TINA_TOKEN!, // Get this from tina.io - build: { outputFolder: 'admin', publicFolder: 'public' }, - schema: { - collections: [ - { - label: 'Blog Posts', - name: 'post', - path: 'posts', - format: 'mdx', - ui: { - router: ({ document }) => { - return `/blog/${document._sys.filename}`; - }, - }, - 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', - }, - ], - }, - ], - }, - ], - }, - ], - }, -}); diff --git a/.tina/schema.ts b/.tina/schema.ts new file mode 100644 index 000000000..1a6c6cd97 --- /dev/null +++ b/.tina/schema.ts @@ -0,0 +1,143 @@ +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/next.config.js b/next.config.js index aa65d5752..b4bd5114b 100644 --- a/next.config.js +++ b/next.config.js @@ -5,14 +5,6 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({ }); module.exports = withBundleAnalyzer({ - async rewrites() { - return [ - { - source: '/admin', - destination: '/admin/index.html', - }, - ] - }, reactStrictMode: true, pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'], images: { diff --git a/package.json b/package.json index d2d0d8c61..18e539ce7 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "yarn tinacms dev -c \"next dev\"", + "dev": "yarn tinacms server:start -c \"next dev\"", "build": "yarn tinacms server:start -c \"next build\"", "start": "yarn tinacms server:start -c \"next start\"", "lint": "next lint" @@ -32,7 +32,7 @@ "schema-dts": "^1.0.0", "styled-components": "^5.3.5", "swiper": "8.3.2", - "tinacms": "1.0.1", + "tinacms": "^0.63.0", "url-loader": "^4.1.1", "use-clipboard-copy": "^0.2.0", "use-resize-observer": "^9.0.2" @@ -41,7 +41,7 @@ "@babel/eslint-parser": "^7.18.9", "@fec/remark-a11y-emoji": "^3.1.0", "@next/bundle-analyzer": "^12.2.4", - "@tinacms/cli": "1.0.1", + "@tinacms/cli": "^0.60.0", "@types/react": "^17.0.20", "@types/react-mailchimp-subscribe": "^2.1.1", "@types/styled-components": "^5.1.25", diff --git a/pages/_app.tsx b/pages/_app.tsx index 8afa98d61..5a4852a18 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -8,6 +8,7 @@ import dynamic from 'next/dynamic'; import Head from 'next/head'; import { ColorModeScript } from 'nextjs-color-mode'; import React, { PropsWithChildren } from 'react'; +import { TinaEditProvider } from 'tinacms/dist/edit-state'; import Footer from 'components/Footer'; import { GlobalStyle } from 'components/GlobalStyles'; @@ -25,6 +26,8 @@ const navItems: NavItems = [ { title: 'Sign up', href: '/sign-up', outlined: true }, ]; +const TinaCMS = dynamic(() => import('tinacms'), { ssr: false }); + function MyApp({ Component, pageProps }: AppProps) { return ( <> @@ -48,7 +51,23 @@ function MyApp({ Component, pageProps }: AppProps) { + + {(livePageProps: any) => } + + } + > +