@@ -505,7 +505,7 @@ export type SettingsQueryResult = {
505
505
} ;
506
506
} | null ;
507
507
// Variable: getPageQuery
508
- // Query: *[_type == 'page' && slug.current == $slug][0]{ _id, _type, name, slug, heading, subheading, "pageBuilder": pageBuilder[]{ ..., _type == "callToAction" => { ..., link { ..., _type == "link" => { "page": page->slug.current, "post": post->slug.current } }, } }, }
508
+ // Query: *[_type == 'page' && slug.current == $slug][0]{ _id, _type, name, slug, heading, subheading, "pageBuilder": pageBuilder[]{ ..., _type == "callToAction" => { ..., link { ..., _type == "link" => { "page": page->slug.current, "post": post->slug.current } }, } }, }
509
509
export type GetPageQueryResult = {
510
510
_id : string ;
511
511
_type : "page" ;
@@ -571,7 +571,7 @@ export type GetPageQueryResult = {
571
571
export type AllPostsQueryResult = Array < {
572
572
_id : string ;
573
573
status : "draft" | "published" ;
574
- title : string | "Untitled" ;
574
+ title : string ;
575
575
slug : string ;
576
576
excerpt : string | null ;
577
577
coverImage : {
@@ -609,7 +609,7 @@ export type AllPostsQueryResult = Array<{
609
609
export type MorePostsQueryResult = Array < {
610
610
_id : string ;
611
611
status : "draft" | "published" ;
612
- title : string | "Untitled" ;
612
+ title : string ;
613
613
slug : string ;
614
614
excerpt : string | null ;
615
615
coverImage : {
@@ -643,7 +643,7 @@ export type MorePostsQueryResult = Array<{
643
643
} | null ;
644
644
} > ;
645
645
// Variable: postQuery
646
- // Query: *[_type == "post" && slug.current == $slug] [0] { content[]{ ..., markDefs[]{ ..., link { ..., _type == "link" => { "page": page->slug.current, "post": post->slug.current } } } }, _id, "status": select(_originalId in path("drafts.**") => "draft", "published"), "title": coalesce(title, "Untitled"), "slug": slug.current, excerpt, coverImage, "date": coalesce(date, _updatedAt), "author": author->{firstName, lastName, picture}, }
646
+ // Query: *[_type == "post" && slug.current == $slug] [0] { content[]{ ..., markDefs[]{ ..., _type == "link" => { "page": page->slug.current, "post": post->slug.current } } }, _id, "status": select(_originalId in path("drafts.**") => "draft", "published"), "title": coalesce(title, "Untitled"), "slug": slug.current, excerpt, coverImage, "date": coalesce(date, _updatedAt), "author": author->{firstName, lastName, picture}, }
647
647
export type PostQueryResult = {
648
648
content : Array < {
649
649
children ?: Array < {
@@ -657,30 +657,19 @@ export type PostQueryResult = {
657
657
markDefs : Array < {
658
658
linkType ?: "href" | "page" | "post" ;
659
659
href ?: string ;
660
- page ?: {
661
- _ref : string ;
662
- _type : "reference" ;
663
- _weak ?: boolean ;
664
- [ internalGroqTypeReferenceTo ] ?: "page" ;
665
- } ;
666
- post ?: {
667
- _ref : string ;
668
- _type : "reference" ;
669
- _weak ?: boolean ;
670
- [ internalGroqTypeReferenceTo ] ?: "post" ;
671
- } ;
660
+ page : string | null ;
661
+ post : string | null ;
672
662
openInNewTab ?: boolean ;
673
663
_type : "link" ;
674
664
_key : string ;
675
- link : null ;
676
665
} > | null ;
677
666
level ?: number ;
678
667
_type : "block" ;
679
668
_key : string ;
680
669
} > | null ;
681
670
_id : string ;
682
671
status : "draft" | "published" ;
683
- title : string | "Untitled" ;
672
+ title : string ;
684
673
slug : string ;
685
674
excerpt : string | null ;
686
675
coverImage : {
@@ -729,10 +718,10 @@ import "@sanity/client";
729
718
declare module "@sanity/client" {
730
719
interface SanityQueries {
731
720
"*[_type == \"settings\"][0]" : SettingsQueryResult ;
732
- "\n *[_type == 'page' && slug.current == $slug][0]{\n _id,\n _type,\n name,\n slug,\n heading,\n subheading,\n \"pageBuilder\": pageBuilder[]{\n ...,\n _type == \"callToAction\" => {\n ...,\n \n link {\n ...,\n _type == \"link\" => {\n \"page\": page->slug.current,\n \"post\": post->slug.current\n } \n }\n,\n }\n },\n }\n" : GetPageQueryResult ;
721
+ "\n *[_type == 'page' && slug.current == $slug][0]{\n _id,\n _type,\n name,\n slug,\n heading,\n subheading,\n \"pageBuilder\": pageBuilder[]{\n ...,\n _type == \"callToAction\" => {\n ...,\n \n link {\n ...,\n \n _type == \"link\" => {\n \"page\": page->slug.current,\n \"post\": post->slug.current\n }\n \n }\n,\n }\n },\n }\n" : GetPageQueryResult ;
733
722
"\n *[_type == \"post\" && defined(slug.current)] | order(date desc, _updatedAt desc) {\n \n _id,\n \"status\": select(_originalId in path(\"drafts.**\") => \"draft\", \"published\"),\n \"title\": coalesce(title, \"Untitled\"),\n \"slug\": slug.current,\n excerpt,\n coverImage,\n \"date\": coalesce(date, _updatedAt),\n \"author\": author->{firstName, lastName, picture},\n\n }\n" : AllPostsQueryResult ;
734
723
"\n *[_type == \"post\" && _id != $skip && defined(slug.current)] | order(date desc, _updatedAt desc) [0...$limit] {\n \n _id,\n \"status\": select(_originalId in path(\"drafts.**\") => \"draft\", \"published\"),\n \"title\": coalesce(title, \"Untitled\"),\n \"slug\": slug.current,\n excerpt,\n coverImage,\n \"date\": coalesce(date, _updatedAt),\n \"author\": author->{firstName, lastName, picture},\n\n }\n" : MorePostsQueryResult ;
735
- "\n *[_type == \"post\" && slug.current == $slug] [0] {\n content[]{\n ...,\n markDefs[]{\n ...,\n \n link {\n ...,\n _type == \"link\" => {\n \"page\": page->slug.current,\n \"post\": post->slug.current\n }\n }\n\n }\n },\n \n _id,\n \"status\": select(_originalId in path(\"drafts.**\") => \"draft\", \"published\"),\n \"title\": coalesce(title, \"Untitled\"),\n \"slug\": slug.current,\n excerpt,\n coverImage,\n \"date\": coalesce(date, _updatedAt),\n \"author\": author->{firstName, lastName, picture},\n\n }\n" : PostQueryResult ;
724
+ "\n *[_type == \"post\" && slug.current == $slug] [0] {\n content[]{\n ...,\n markDefs[]{\n ...,\n \n _type == \"link\" => {\n \"page\": page->slug.current,\n \"post\": post->slug.current\n }\n\n }\n },\n \n _id,\n \"status\": select(_originalId in path(\"drafts.**\") => \"draft\", \"published\"),\n \"title\": coalesce(title, \"Untitled\"),\n \"slug\": slug.current,\n excerpt,\n coverImage,\n \"date\": coalesce(date, _updatedAt),\n \"author\": author->{firstName, lastName, picture},\n\n }\n" : PostQueryResult ;
736
725
"\n *[_type == \"post\" && defined(slug.current)]\n {\"slug\": slug.current}\n" : PostPagesSlugsResult ;
737
726
"\n *[_type == \"page\" && defined(slug.current)]\n {\"slug\": slug.current}\n" : PagesSlugsResult ;
738
727
}
0 commit comments