- Scott Chacon on the Interwebs(リンク切れ)
- Scott Chacon on the Interwebs
- GitHub Flow - The best way to use Git and GitHub
31 Aug 2011
2021-05-23
@voluntas
2021.1
# This is a full-blown offset-based pagination system modelled after GraphQL-Ruby's | |
# built-in connections. It has a few different elements: | |
# | |
# - `::Page`, a plain ol' Ruby class for modeling _pages_ of things. | |
# This class handles applying pagination arguments to lists (Arrays and AR::Relations) | |
# and provides metadata about pagination. (Similar to `will_paginate`.) | |
# - `Schema::BasePage` is a generic GraphQL-Ruby object type. It's never used directly, | |
# but it can generate subclasses which wrap _specific_ object types in the schema. | |
# - `Schema::BaseObject.page_type` is a convenience method for generating page types | |
# from your object types. You could leave this out and make subclasses with plain ol' |
📝 I submit the same text to GitHub Support.
I want to use same scope for npm package and GitHub Package Registry.
For example, @org
scope exist in npm and GitHub.
@org/foo-public
package is public on npm registry@org/bar-private
package is private on GitHub Package Registryimport { captureException, flush } from '@sentry/nextjs'; | |
import NextErrorComponent from 'next/error'; | |
import type { ErrorProps } from 'next/error'; | |
import type { NextPage } from 'next'; | |
interface AppErrorProps extends ErrorProps { | |
err?: Error; | |
hasGetInitialPropsRun?: boolean; | |
} |
# 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) |
// ~/docker/config.json | |
{ | |
"credsStore": "desktop", | |
"credHelpers": { | |
"docker.pkg.github.com": "gh", | |
"ghcr.io": "gh" | |
} | |
} |