graphql
This commit is contained in:
@@ -38,7 +38,7 @@ export default function Introduction({ allLegacy, allRest, setActiveTopic }) {
|
||||
<h2 className="text-xs font-bold uppercase tracking-widest text-slate-400 mb-4">Base URLs</h2>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3 mb-10">
|
||||
<div className="bg-white border border-slate-200/60 rounded-xl p-4 shadow-sm">
|
||||
<div className="text-[11px] text-brand-600 font-bold uppercase tracking-widest mb-1.5">Hasura API</div>
|
||||
<div className="text-[11px] text-brand-600 font-bold uppercase tracking-widest mb-1.5">GraphQL API</div>
|
||||
<code className="font-mono text-sm text-slate-700">{LEGACY_BASE_URL}</code>
|
||||
</div>
|
||||
<div className="bg-white border border-slate-200/60 rounded-xl p-4 shadow-sm">
|
||||
@@ -74,7 +74,7 @@ export default function Introduction({ allLegacy, allRest, setActiveTopic }) {
|
||||
? 'bg-brand-50 text-brand-600 border border-brand-100'
|
||||
: 'bg-indigo-50 text-indigo-600 border border-indigo-100'
|
||||
}`}>
|
||||
{topic.type === 'legacy' ? 'Hasura' : 'REST'}
|
||||
{topic.type === 'legacy' ? 'GraphQL' : 'REST'}
|
||||
</span>
|
||||
<span className="text-[11px] text-slate-400">{topic.endpoints.length} endpoint{topic.endpoints.length !== 1 ? 's' : ''}</span>
|
||||
</div>
|
||||
@@ -90,7 +90,7 @@ export default function Introduction({ allLegacy, allRest, setActiveTopic }) {
|
||||
<div className="mt-16 flex items-center gap-4 p-6 bg-slate-900 text-slate-300 rounded-2xl shadow-code">
|
||||
<Code2 className="text-brand-400 shrink-0" size={24} />
|
||||
<p className="text-sm">
|
||||
Explore interactive endpoints for both Hasura and REST APIs. All requests route through the dev proxy which injects authentication headers securely.
|
||||
Explore interactive endpoints for both GraphQL and REST APIs. All requests route through the dev proxy which injects authentication headers securely.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ export default function Sidebar({ legacyTopics, restTopics, activeTopic, setActi
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{legacyTopics.length > 0 && renderTopicGroup(legacyTopics, 'Hasura API', 'legacy')}
|
||||
{legacyTopics.length > 0 && renderTopicGroup(legacyTopics, 'GraphQL API', 'legacy')}
|
||||
{restTopics.length > 0 && renderTopicGroup(restTopics, 'REST API', 'rest')}
|
||||
|
||||
</nav>
|
||||
|
||||
@@ -5,7 +5,7 @@ import { getTopicIcon } from '../lib/icons'
|
||||
import { LEGACY_BASE_URL } from '../data/topics'
|
||||
|
||||
function toProxyPath(fullUrl, baseUrl) {
|
||||
// Only proxy the legacy Hasura API (to inject the admin secret via server)
|
||||
// Only proxy the legacy GraphQL API (to inject the admin secret via server)
|
||||
if (baseUrl === LEGACY_BASE_URL && fullUrl.startsWith(baseUrl)) {
|
||||
return fullUrl.slice(baseUrl.length)
|
||||
}
|
||||
@@ -99,7 +99,7 @@ export default function TopicView({ topic, searchQuery }) {
|
||||
: 'bg-indigo-50 text-indigo-600 border-indigo-100'
|
||||
}`}>
|
||||
<span className="w-1.5 h-1.5 rounded-full bg-current"></span>
|
||||
{topic.type === 'legacy' ? 'Hasura API' : 'REST API'}
|
||||
{topic.type === 'legacy' ? 'GraphQL API' : 'REST API'}
|
||||
</span>
|
||||
<span className="text-sm text-slate-400">{filtered.length} endpoint{filtered.length !== 1 ? 's' : ''}</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user