Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
algolia-graphql-schema
Advanced tools
Given an Algolia index, generates valid GraphQL types for exposing a GraphQL backend search Query
Given an Algolia index, generates valid GraphQL types for exposing a GraphQL backend search Query
algolia_graphql_config.json
{
"algoliaIndex": "products",
"algoliaAppId": "",
"algoliaAdminApiKey": "",
"algoliaSearchApiKey": "",
"outputDir": "typedefs/",
"outputFileName": "algolia",
"searchQueryName": "search",
"fallbackTypes": {
"collections[]": "string"
}
}
For an Algolia index with the following objects:
[
{
"id": "e2866573-7591-4742-b2bc-891b78d679bd",
"title": "Handcrafted Concrete Pants",
"collections": ["Cotton"],
"shipping": "Free shipping",
"salePrice": 781
},
{
"id": "a07d4dd8-7fc8-40b6-9879-cf6e0dd9efb7",
"title": "Refined Soft Chicken",
"collections": ["Fresh"],
"salePrice": 657
}
]
the following GraphQL types are generated:
type AlgoliaResultObject {
id: String!
title: String!
collections: [String!]!
salePrice: Int!
shipping: String
}
type SearchResultsEdge {
cursor: Int!
node: AlgoliaResultObject
}
type SearchResults {
edges: [SearchResultsEdge!]!
totalCount: Int!
}
input SearchInput {
query: String
similarQuery: String
# ...
}
type Query {
# ...
search_flights($input: SearchInput!, $after: String): [SearchResults!]!
}
GraphQL does not support union on scalar types.
For this reason, the following Algolia search params have the following breaking GraphQL type definition changes:
facetFilters?: string | readonly string[] | ReadonlyArray<readonly string[]>;
➡️ facetFilters: [String]
optionalFilters?: string | readonly string[] | ReadonlyArray<readonly string[] | string>;
➡️ optionalFilters: [String]
numericFilters?: string | readonly string[] | ReadonlyArray<readonly string[]>;
➡️ numericFilters: [String]
tagFilters?: string | readonly string[] | ReadonlyArray<readonly string[]>;
➡️ tagFilters: [String]
aroundRadius?: number | 'all';
➡️ aroundRadius: Int
aroundPrecision?: number | ReadonlyArray<{ from: number; value: number; }>;
➡️ aroundPrecision: Int
ignorePlurals?: boolean | readonly string[];
➡️ ignorePlurals: Boolean
removeStopWords?: boolean | readonly string[];
➡️ removeStopWords: Boolean
distinct?: boolean | number;
➡️ distinct: Boolean
optionalWords?: string | readonly string[];
➡️ optionalWords: [String]
SearchInput
typeThe generated search query SearchInput
type is the following:
input SearchInput {
query: String
similarQuery: String
facetFilters: [String]
optionalFilters: [String]
numericFilters: [String]
tagFilters: [String]
sumOrFiltersScores: Boolean
filters: String
page: Int
hitsPerPage: Int
offset: Int
length: Int
attributesToHighlight: [String]
attributesToSnippet: [String]
attributesToRetrieve: [String]
highlightPreTag: String
highlightPostTag: String
snippetEllipsisText: String
restrictHighlightAndSnippetArrays: Boolean
facets: [String]
maxValuesPerFacet: Int
facetingAfterDistinct: Boolean
minWordSizefor1Typo: Int
minWordSizefor2Typos: Int
allowTyposOnNumericTokens: Boolean
disableTypoToleranceOnAttributes: [String]
queryType: String
removeWordsIfNoResults: String
advancedSyntax: Boolean
advancedSyntaxFeatures: [String]
optionalWords: [String]
disableExactOnAttributes: [String]
exactOnSingleWordQuery: String
alternativesAsExact: [String]
enableRules: Boolean
ruleContexts: [String]
distinct?: boolean | number;
analytics: Boolean
analyticsTags: [String]
synonyms: Boolean
replaceSynonymsInHighlight: Boolean
minProximity: Int
responseFields: [String]
maxFacetHits: Int
percentileComputation: Boolean
clickAnalytics: Boolean
personalizationImpact: Int
enablePersonalization: Boolean
restrictSearchableAttributes: [String]
sortFacetValuesBy: String
typoTolerance: String
aroundLatLng: String
aroundLatLngViaIP: Boolean
aroundRadius: Int
aroundPrecision: Int
minimumAroundRadius: Int
insideBoundingBox: [Int]
insidePolygon: [Int]
ignorePlurals: Boolean
removeStopWords: Boolean
naturalLanguages: [String]
getRankingInfo: Boolean
userToken: String
enableABTest: Boolean
decompoundQuery: Boolean
relevancyStrictness: Int
}
FAQs
Given an Algolia index, generates valid GraphQL types for exposing a GraphQL backend search Query
The npm package algolia-graphql-schema receives a total of 4 weekly downloads. As such, algolia-graphql-schema popularity was classified as not popular.
We found that algolia-graphql-schema demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.