This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# official docs: https://graphql-ruby.org/dataloader/sources.html | |
# app/graphql/sources/association.rb | |
class Sources::Association < ::GraphQL::Dataloader::Source | |
def initialize(association_name, scope = nil) | |
@association_name = association_name | |
@scope = scope | |
end | |
def fetch(records) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Route, Switch } from "wouter-preact"; | |
const pageFiles = import.meta.globEager("./pages/**/*.tsx"); | |
const pages = Object.keys(pageFiles) | |
.sort() | |
.reverse() // Ensure the order of page file names. Put `:<filename>` to the end of the array. | |
.map((filePath) => { | |
const path = filePath.slice(8, -4).replace(/\/?index$/, ""); | |
const { Page } = pageFiles[filePath]; |
OlderNewer