![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@orbitalhq/taxiql-client
Advanced tools
A Typescript client for executing TaxiQL from client side libraries
A TypeScript client for executing TaxiQL from client-side libraries.
npm install @orbitalhq/taxiql-client
The library allows you to execute TaxiQL queries from client-side applications. However, in order to ensure correct execution, any query must be wrapped using the taxiQl function, which is imported from the Taxi types generated by the @orbitalhq/taxiql-codegen library.
Here's an example:
import { taxiQl } from './generated/queries.ts';
const QUERY = taxiQl(`
query FindFilms {
find { Film[] }
}
`);
In this example, the query is wrapped by the taxiQl
function to ensure the query is valid and conforms to the expected TaxiQL format. The taxiQl
function ensures that the query is processed correctly before being sent to the backend for execution.
You need to install the @orbitalhq/taxiql-codegen
package to generate the necessary Taxi types and support the taxiQl
function.
npm install @orbitalhq/taxiql-codegen
Once you've written your TaxiQL, you'll need to use
import { TaxiClient } from "@orbitalhq/taxiql-client";
import { taxiQl } from './generated/queries.ts';
const QUERY = taxiQl(`
query FindFilms {
find { Film[] }
}`)
const client = new TaxiClient({ orbitalServerUrl: "https://your-orbitalServerUrl.com/api" });
client.query(QUERY).then(response => console.log(response));
To create a streaming subscription, you can use
import { TaxiClient } from "@orbitalhq/taxiql-client";
import { taxiQl } from './generated/queries.ts';
const QUERY = taxiQl(`
query StreamAnnouncement {
stream { demo.petflix.NewFilmReleaseAnnouncement } }
}`)
const client = new TaxiClient({ orbitalServerUrl: "https://your-orbitalServerUrl.com/api" });
client.subscribe(QUERY).then(response => console.log(response));
Ensure you wrap your root component in the TaxiProvider
to ensure the hooks have access to the TaxiClient
which is stored in context
import { TaxiClient, TaxiProvider } from "@orbitalhq/taxiql-client";
const client = new TaxiClient({ orbitalServerUrl: "https://your-orbitalServerUrl.com/api" });
function App() {
return (
<TaxiProvider client={client}>
<YourComponents />
</TaxiProvider>
);
}
import { useQuery } from "@orbitalhq/taxiql-client";
const QUERY = taxiQl(`
query FindFilms {
find { Film[] }
}`)
function UsersList() {
const { data, loading, error } = useQuery(QUERY);
if (loading) return <p>Loading...</p>;
if (error) return <p>Error: {error.message}</p>;
return (
<ul>
{data.users.map(user => (
<li key={user.id}>{user.name}</li>
))}
</ul>
);
}
import { useLazyQuery } from "@orbitalhq/taxiql-client";
const QUERY = taxiQl(`
query FindFilms {
find { Film[] }
}`)
function UserProfile() {
const [fetchUser, { data, loading, error }] = useLazyQuery(query);
return (
<div>
<button onClick={() => fetchUser()}>Fetch User</button>
{loading && <p>Loading...</p>}
{error && <p>Error: {error.message}</p>}
{data && <p>{data.user.name}</p>}
</div>
);
}
import { useSubscription } from "@orbitalhq/taxiql-client";
const STREAM = taxiQl(`query TestStream { stream { demo.netflix.NewFilmReleaseAnnouncement } }`)
function Messages() {
const { data } = useSubscription(STREAM);
return (
<div>
{data?.rating && <p>{data.rating.provider}</p>}
</div>
);
}
import { useLazySubscription } from "@orbitalhq/taxiql-client";
const STREAM = taxiQl(`query TestStream { stream { demo.netflix.NewFilmReleaseAnnouncement } }`)
function Messages() {
const [executeQuery, { data }] = useLazySubscription(STREAM);
return (
<div>
<button onClick={executeQuery}>Stream query</button>
{data?.rating && <p>{data.rating.provider}</p>}
</div>
);
}
To build the package, run:
npm run build
fetchMore
from Apollo)find
operations to be "streamed" back to the clientThis project is licensed under the Apache-2.0 License.
FAQs
A Typescript client for executing TaxiQL from client side libraries
The npm package @orbitalhq/taxiql-client receives a total of 162 weekly downloads. As such, @orbitalhq/taxiql-client popularity was classified as not popular.
We found that @orbitalhq/taxiql-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.