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 { SelectField } from '@redwoodjs/forms' | |
import LoadingSpinner from 'src/components/LoadingSpinner/LoadingSpinner' | |
export const QUERY = gql` | |
query CITIES( | |
$page: Int | |
$limit: Int | |
$filter: [CitiesFilterInput] | |
$orderBy: [CitiesOrderByInput] |
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 { | |
db, | |
foreignKeyReplacement, | |
formatFilter, | |
formatOrderBy, | |
} from 'src/lib/db' | |
import { requireAuth } from 'src/lib/auth' | |
const filterFieldMap = { | |
KEYWORD: { |
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
export const QUERY = gql` | |
query USERS { | |
users { | |
id | |
name | |
} | |
} | |
` | |
export const Loading = () => <div>Loading users...</div> | |
export const Empty = () => <div>No users yet!</div> |
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
# Create a cell for Users | |
$ yarn rw generate cell Users | |
# Create a layout named Admin | |
$ yarn rw generate layout Admin | |
# Create an About page and set the URL to /about | |
$ yarn rw generate page About /about | |
# Read the DB schema and create the SDL file for the User table |