如何使用Neo4J GraphQl库在CRUD操作上构建图形?
我试图使用Neo4J GraphQl库构建GrandStack应用程序。而不是像已经存在的数据那样,而是像Neo4J Internet中显示的大多数教程一样。我想通过使用React表单询问用户数据来构建图形。由于我是Neo4J GraphQl库和Apollo服务器的新手,因此我发现很难理解如何设置。
我已经在下面设置了一个示例React表单代码。从这里,我感到困惑如何使用Neo4J GraphQl库。有人可以在这里帮我吗?
import './App.css';
import {TextField, Button} from "@mui/material"
import {useState} from "react"
function App() {
const [data, setdata] = useState("");
const [datatwo, setdatatwo] = useState("");
const onSubmit = (e) =>{
e.preventDefault();
alert({data})
}
return (
<div className="App">
<form noValidate onSubmit={onSubmit}>
<TextField id="outlined-basic" label="Name" variant="outlined" onChange={(e)=>setdata(e.target.value)}/>
<TextField id="outlined-basic" label="Name" variant="outlined" onChange={(e)=>setdatatwo(e.target.value)}/>
<Button variant="contained">Submit</Button>
</form>
<div>First Name is:{data}</div>
<div>last Name is:{datatwo}</div>
</div>
);
}
export default App;
I was trying to build grandstack app using neo4j graphql library. Rather than working on already existing data, like the most tutorials shown in the internet for neo4j. I want to build a graph by asking the user data using a react form. As I am new to neo4j graphql library and apollo server i am finding it hard to understand how to setup.
I have setup an example react form code below. From here i was getting confused how to use neo4j graphql library. can some one help me here.
import './App.css';
import {TextField, Button} from "@mui/material"
import {useState} from "react"
function App() {
const [data, setdata] = useState("");
const [datatwo, setdatatwo] = useState("");
const onSubmit = (e) =>{
e.preventDefault();
alert({data})
}
return (
<div className="App">
<form noValidate onSubmit={onSubmit}>
<TextField id="outlined-basic" label="Name" variant="outlined" onChange={(e)=>setdata(e.target.value)}/>
<TextField id="outlined-basic" label="Name" variant="outlined" onChange={(e)=>setdatatwo(e.target.value)}/>
<Button variant="contained">Submit</Button>
</form>
<div>First Name is:{data}</div>
<div>last Name is:{datatwo}</div>
</div>
);
}
export default App;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论