Skip to content

Commit

Permalink
Merge pull request #3 from Sphereon-Opensource/feature/VDX-233/facete…
Browse files Browse the repository at this point in the history
…d_search

VDX-233 Implement faceted search to the Energy SHR portal
  • Loading branch information
zoemaas authored Jul 26, 2023
2 parents d19796d + a843208 commit 7dd378c
Show file tree
Hide file tree
Showing 41 changed files with 2,816 additions and 487 deletions.
4 changes: 2 additions & 2 deletions content/site.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
{
"name": "Catalogue",
"link": "/search?sort=nft.created&sortOrder=desc"
"link": "/search"
},
{
"name": "Publish",
Expand All @@ -43,7 +43,7 @@
{ "label": "About Gaia-X", "link": "/gaia-x" },
{
"label": "Catalogue",
"link": "/search?sort=nft.created&sortOrder=desc"
"link": "/search"
},
{ "label": "First time visiting", "link": "/onboarding" }
]
Expand Down
13 changes: 13 additions & 0 deletions graphql/queries/getAggregations.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const getAggregations = `
query getAggregations {
aggregations {
category
keywords {
label
location
count
}
}
}
`
export default getAggregations
17 changes: 17 additions & 0 deletions graphql/schema.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const schema = `
type Query {
aggregations: [Aggregation]
}
type Keyword {
label: String
location: String
count: Int
}
type Aggregation {
category: String
keywords: [Keyword]
}
`
export default schema
5 changes: 5 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ module.exports = (phase, { defaultConfig }) => {
const nextConfig = {
webpack: (config, options) => {
config.module.rules.push(
{
test: /\.(graphql|gql)/,
exclude: /node_modules/,
loader: 'graphql-tag/loader'
},
{
test: /\.svg$/,
issuer: /\.(tsx|ts)$/,
Expand Down
Loading

0 comments on commit 7dd378c

Please sign in to comment.