Best way to rename field?
See original GitHub issueI have a property named IPAddress
, and its converted to iPAddress
what is the best way to rename it?
Currently i do the following:
schema.Type<Device>().RemoveField(x => x.IPAddress);
schema.Type<Device>().AddField("ipAddress", x => x.IPAddress, "");
The downside i have found is that i loose all comments that i have applied using the Description attribute. (Same thing happens with MACAddress
)
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
4 ways to rename a field in Tableau
Drop Down & Rename: click on the drop down on top of the field name, select rename, rename and click enter. 2. Double...
Read more >Rename a Field in a Table in Access - Instructions and ...
Then click into the “Field Name” column of the field whose name you wish to change. Type a new name for the field....
Read more >Renaming Fields / Relabeling Fields
Renaming Standard Fields · Click the gear icon at the top of the page, next click Edit Object. · In the object menu,...
Read more >How To Rename Column Name In SQL? - Edureka
The RENAME command is used to rename column name in sql. ALTER TABLE TableName RENAME COLUMN OldColumnName TO NewColumnName;
Read more >Renaming a field—ArcMap | Documentation
The Table Fields tab appears. Table Fields tab. Right-click a Name or Alias cell and click Rename. Type the new name for the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lukemurray the
AddMutationFrom
does not have a fieldNamer argument so the input arguments there still get incorrectly renamed.How about storing the one that gets sent into
FromObject
that way we don’t have to send a new one with everyAddType
.Or if you want a function that handles this correctly (I have tested all combinations i can think of but i might have missed something):
Whoops thanks.
From: Peter notifications@github.com Sent: Friday, June 5, 2020 1:57:20 AM To: lukemurray/EntityGraphQL EntityGraphQL@noreply.github.com Cc: Luke Murray lukemurray@gmail.com; Comment comment@noreply.github.com Subject: Re: [lukemurray/EntityGraphQL] Best way to rename field? (#46)
I think i found a bug https://github.com/lukemurray/EntityGraphQL/blob/74f8d576870eb4cfc31a3a2fc4607bdf058eb513/src/EntityGraphQL/Schema/SchemaBuilder.cs#L46 the fieldRenamer is never passed to the other method.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/lukemurray/EntityGraphQL/issues/46#issuecomment-638947686, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AABGHUOYT3GO5GCYU3BM2HTRU676BANCNFSM4M5ZZYAQ.