11import { gql , GraphQLClient } from "graphql-request" ;
22import type { AllPostsData , PostOrPageData , PublicationData } from "./schema" ;
3- import Config from "virtual:astro-hashnode/config" ;
3+ import config from "virtual:astro-hashnode/config" ;
44
55export const getClient = ( ) => {
66 return new GraphQLClient ( "https://gql.hashnode.com" )
@@ -12,7 +12,7 @@ export const getAllPosts = async () => {
1212 const allPosts = await client . request < AllPostsData > (
1313 gql `
1414 query allPosts {
15- publication(host: "${ Config . hashnodeURL } ") {
15+ publication(host: "${ config . hashnodeURL } ") {
1616 title
1717 posts(first: 20) {
1818 pageInfo{
@@ -56,7 +56,7 @@ export const getPost = async (slug: string) => {
5656 const data = await client . request < PostOrPageData > (
5757 gql `
5858 query postDetails($slug: String!) {
59- publication(host: "${ Config . hashnodeURL } ") {
59+ publication(host: "${ config . hashnodeURL } ") {
6060 post(slug: $slug) {
6161 author{
6262 name
@@ -92,7 +92,7 @@ export const getAboutPage = async () => {
9292 const page = await client . request < PostOrPageData > (
9393 gql `
9494 query pageData {
95- publication(host: "${ Config . hashnodeURL } ") {
95+ publication(host: "${ config . hashnodeURL } ") {
9696 staticPage(slug: "about") {
9797 title
9898 content {
@@ -114,7 +114,7 @@ export const getPublication = async () => {
114114 const data = await client . request < PublicationData > (
115115 gql `
116116 query pubData {
117- publication(host: "${ Config . hashnodeURL } ") {
117+ publication(host: "${ config . hashnodeURL } ") {
118118 title
119119 displayTitle
120120 descriptionSEO
0 commit comments