Skip to content

Commit

Permalink
order projects by last updated and if they have an edited profile
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanlesich committed Aug 8, 2024
1 parent ac89d64 commit bae8546
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/.graphclient/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10876,7 +10876,10 @@ export const getProjectGrantsDocument = gql`
${ShipDisplayFragmentDoc}` as unknown as DocumentNode<getProjectGrantsQuery, getProjectGrantsQueryVariables>;
export const GetProjectsDocument = gql`
query GetProjects($chainId: Int!) {
Project(where: {chainId: {_eq: $chainId}}) {
Project(
order_by: {db_write_timestamp: desc, hasEditedProfile: desc_nulls_last}
where: {chainId: {_eq: $chainId}}
) {
...ProjectDetails
metadata {
...RawMetadata
Expand All @@ -10887,7 +10890,10 @@ export const GetProjectsDocument = gql`
${RawMetadataFragmentDoc}` as unknown as DocumentNode<GetProjectsQuery, GetProjectsQueryVariables>;
export const GetUserProjectsDocument = gql`
query GetUserProjects($id: String!) {
Project(where: {owner: {_eq: $id}}) {
Project(
order_by: {db_write_timestamp: desc, hasEditedProfile: desc_nulls_last}
where: {owner: {_eq: $id}}
) {
...ProjectDetails
metadata {
...RawMetadata
Expand Down
10 changes: 8 additions & 2 deletions src/graphql/newQueries/getProjects.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ fragment RawMetadata on RawMetadata {
}

query GetProjects($chainId: Int!) {
Project(where: { chainId: { _eq: $chainId } }) {
Project(
order_by: { db_write_timestamp: desc, hasEditedProfile: desc_nulls_last }
where: { chainId: { _eq: $chainId } }
) {
...ProjectDetails
metadata {
...RawMetadata
Expand All @@ -22,7 +25,10 @@ query GetProjects($chainId: Int!) {
}

query GetUserProjects($id: String!) {
Project(where: { owner: { _eq: $id } }) {
Project(
order_by: { db_write_timestamp: desc, hasEditedProfile: desc_nulls_last }
where: { owner: { _eq: $id } }
) {
...ProjectDetails
metadata {
...RawMetadata
Expand Down

0 comments on commit bae8546

Please sign in to comment.